Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     debug('START WIDGET: ' . static::class);
     $this->setTemplate('Default.php');
     $this->setContentTemplate($this->getTemplatePath());
     $this->_form = new Form();
 }
Esempio n. 2
0
 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;
     }
 }