public function __construct($template = NULL, array $partials = NULL) { // Если был сабмит формы редактирования if (!empty($_POST['action']) && $_POST['action'] == 'update' && !empty($_POST['name']) && !empty($_POST['url']) && !empty($_POST['ord'])) { $this->message_data = $this->update_page($_POST); } elseif (!empty($_POST['action']) && $_POST['action'] == 'update') { $this->message_data = array('text' => 'Заполните обязательные поля', 'error' => 1); } // Шаблон берем от метода Add $template = 'admin/content/add'; parent::__construct($template, $partials); }
public function __construct($template = NULL, array $partials = NULL) { parent::__construct($template, $partials); }