OpenCart 🇺🇦

Схема

protected mixed validate ( )

Аргументы

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

Описание

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

Исходный код

if (!$this->user->hasPermission('modify', 'module/carousel')) {
	$this->error['warning'] = $this->language->get('error_permission');
}

if (isset($this->request->post['carousel_module'])) {
	foreach ($this->request->post['carousel_module'] as $key => $value) {				
		if (!$value['width'] || !$value['height']) {
			$this->error['image'][$key] = $this->language->get('error_image');
		}
	}
}	

if (!$this->error) {
	return true;
} else {
	return false;
}