OpenCart 🇺🇦

Класс ControllerToolErrorLog extends Controller { ... }

Название свойства Описание
ControllerToolErrorLog::$error private mixed $error = array();
Тип Возвр. Описание
public mixed index ( )
Исходный код метода:
$this->language->load('tool/error_log');

$this->document->setTitle($this->language->get('heading_title'));

$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['button_clear'] = $this->language->get('button_clear');

if (isset($this->session->data['success'])) {
	$this->data['success'] = $this->session->data['success'];

	unset($this->session->data['success']);
} else {
	$this->data['success'] = '';
}

$this->data['breadcrumbs'] = array();

$this->data['breadcrumbs'][] = array(
	'text'      => $this->language->get('text_home'),
	'href'      => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),       		
	'separator' => false
);

$this->data['breadcrumbs'][] = array(
	'text'      => $this->language->get('heading_title'),
	'href'      => $this->url->link('tool/error_log', 'token=' . $this->session->data['token'], 'SSL'),
	'separator' => ' :: '
);

$this->data['clear'] = $this->url->link('tool/error_log/clear', 'token=' . $this->session->data['token'], 'SSL');

$file = DIR_LOGS . $this->config->get('config_error_filename');

if (file_exists($file)) {
	$this->data['log'] = file_get_contents($file, FILE_USE_INCLUDE_PATH, null);
} else {
	$this->data['log'] = '';
}

$this->template = 'tool/error_log.tpl';
$this->children = array(
	'common/header',
	'common/footer'
);

$this->response->setOutput($this->render());
public mixed clear ( )
Исходный код метода:
$this->language->load('tool/error_log');

$file = DIR_LOGS . $this->config->get('config_error_filename');

$handle = fopen($file, 'w+'); 

fclose($handle); 			

$this->session->data['success'] = $this->language->get('text_success');

$this->redirect($this->url->link('tool/error_log', 'token=' . $this->session->data['token'], 'SSL'));		

Связанные классы:

Название класса Роль
class Config { ... } Компонент Config используется в данном классе
class Document { ... } Компонент Document используется в данном классе
class Language { ... } Компонент Language используется в данном классе
class Response { ... } Компонент Response используется в данном классе
class Session { ... } Компонент Session используется в данном классе
class Url { ... } Компонент Url используется в данном классе

Комментарии