HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/hanode/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Log/View.php
<?php

namespace WPML\TM\ATE\Log;

use WPML\Collect\Support\Collection;

class View {

	/** @var Collection $logs */
	private $logs;

	public function __construct( Collection $logs ) {
		$this->logs = $logs;
	}

	public function renderPage() {
		?>
		<div class="wrap">
			<h1><?php esc_html_e( 'Advanced Translation Editor Error Logs', 'wpml-translation-management' ); ?></h1>
			<br>
			<table class="wp-list-table widefat fixed striped posts">
				<thead><?php $this->renderTableHeader(); ?></thead>

				<tbody id="the-list">
				<?php
				if ( $this->logs->isEmpty() ) {
					$this->renderEmptyTable();
				} else {
					$this->logs->each( [ $this, 'renderTableRow' ] );
				}
				?>
				</tbody>
				<tfoot><?php $this->renderTableHeader(); ?></tfoot>
			</table>
		</div>
		<?php
	}

	private function renderTableHeader() {
		?>
		<tr>
			<th class="date">
				<span><?php esc_html_e( 'Date', 'wpml-translation-management' ); ?></span>
			</th>
			<th class="event">
				<span><?php esc_html_e( 'Event', 'wpml-translation-management' ); ?></span>
			</th>
			<th class="description">
				<span><?php esc_html_e( 'Description', 'wpml-translation-management' ); ?></span>
			</th>
			<th class="wpml-job-id">
				<span><?php esc_html_e( 'WPML Job ID', 'wpml-translation-management' ); ?></span>
			</th>
			<th class="ate-job-id">
				<span><?php esc_html_e( 'ATE Job ID', 'wpml-translation-management' ); ?></span>
			</th>
			<th class="extra-data">
				<span><?php esc_html_e( 'Extra data', 'wpml-translation-management' ); ?></span>
			</th>
		</tr>
		<?php
	}

	public function renderTableRow( Entry $entry ) {
		?>
		<tr>
			<td class="date">
				<?php echo esc_html( $entry->getFormattedDate() ); ?>
			</td>
            <td class="event">
				<?php echo esc_html( EventsTypes::getLabel( $entry->eventType ) ); ?>
            </td>
			<td class="description">
				<?php echo esc_html( $entry->description ); ?>
			</td>
			<td class="wpml-job-id">
				<?php echo esc_html( (string) $entry->wpmlJobId ); ?>
			</td>
			<td class="ate-job-id">
				<?php echo esc_html( (string) $entry->ateJobId ); ?>
			</td>
			<td class="extra-data">
				<?php echo esc_html( $entry->getExtraDataToString() ); ?>
			</td>
		</tr>
		<?php
	}

	private function renderEmptyTable() {
		?>
		<tr>
			<td colspan="6" class="title column-title has-row-actions column-primary">
				<?php esc_html_e( 'No entries', 'wpml-translation-management' ); ?>
			</td>
		</tr>
		<?php
	}
}