public function __construct($dict = array()) { if (!isset($dict['path'])) { throw new FormException('No upload path given'); } $this->path = $dict['path']; $this->widget = new FileInputWidget(); parent::__construct($dict); }
public function __construct($dict = array()) { if (!isset($dict['queryset'])) { throw new FormException('No queryset provided.'); } $this->widget = new SelectWidget(); $this->choices = array_map(function ($item) { return array($item->id, $item->__toString()); }, $dict['queryset']->toArray()); parent::__construct($dict); }
public function __construct($dict = array()) { $this->widget = new HiddenInputWidget(); parent::__construct($dict); }