OpenCart 🇺🇦

Схема

public mixed templateForm ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

$this->load->model('openbay/ebay');

$this->data['token'] = $this->session->data['token'];

if (isset($this->error['warning'])) {
	$this->data['error_warning'] = $this->error['warning'];
} else {
	$this->data['error_warning'] = '';
}

if (isset($this->request->get['template_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
	$template_info = $this->model_openbay_ebay_template->get($this->request->get['template_id']);
}

$this->document->setTitle($this->data['page_title']);
$this->document->addStyle('view/stylesheet/openbay.css');
$this->document->addStyle('view/stylesheet/codemirror.css');
$this->document->addScript('view/javascript/openbay/codemirror.js');
$this->document->addScript('view/javascript/openbay/faq.js');

$this->template = 'openbay/ebay_template_form.tpl';

$this->children = array(
	'common/header',
	'common/footer'
);

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

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

$this->data['breadcrumbs'][] = array(
	'href' => $this->url->link('extension/openbay', 'token=' . $this->session->data['token'], 'SSL'),
	'text' => 'OpenBay Pro',
	'separator' => ' :: '
);

$this->data['breadcrumbs'][] = array(
	'href' => $this->url->link('openbay/openbay', 'token=' . $this->session->data['token'], 'SSL'),
	'text' => 'eBay',
	'separator' => ' :: '
);

$this->data['breadcrumbs'][] = array(
	'href' => $this->url->link('openbay/openbay/listAll', 'token=' . $this->session->data['token'], 'SSL'),
	'text' => 'Profiles',
	'separator' => ' :: '
);

if (isset($this->request->post['name'])) {
	$this->data['name'] = $this->request->post['name'];
} elseif (!empty($template_info)) {
	$this->data['name'] = $template_info['name'];
} else {
	$this->data['name'] = '';
}

if (isset($this->request->post['html'])) {
	$this->data['html'] = $this->request->post['html'];
} elseif (!empty($template_info)) {
	$this->data['html'] = $template_info['html'];
} else {
	$this->data['html'] = '';
}

if (isset($this->request->get['template_id'])) {
	$this->data['template_id'] = $this->request->get['template_id'];
} else {
	$this->data['template_id'] = '';
}

$this->response->setOutput($this->render(true), $this->config->get('config_compression'));