public function __construct() { parent::__construct(); debug('START WIDGET: ' . static::class); $this->setTemplate('Default.php'); $this->setContentTemplate($this->getTemplatePath()); $this->_form = new Form(); }
protected function validate(array $validation = null) { parent::validate($validation); if ($this->hasErrors()) { $exception = new ValidationException(join(', ', $this->getErrorsArray()), 400); $exception->setErrors($this->getErrorsArray()); throw $exception; } }