Exemple #1
0
 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);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public function __construct($dict = array())
 {
     $this->widget = new HiddenInputWidget();
     parent::__construct($dict);
 }