Beispiel #1
0
 protected function onComponentTag(ComponentTag $tag)
 {
     $this->checkComponentTag($tag, 'select');
     $this->checkComponentTagAttribute($tag, "multiple", "multiple");
     $tag->put('size', $this->rows);
     parent::onComponentTag($tag);
 }
Beispiel #2
0
 protected function onInitialize()
 {
     parent::onInitialize();
     $this->selection = $this->getModelObject();
     $this->group = new CheckBoxGroup('choice', $this->getModel());
     $this->add($this->group);
     //@todo add the type hint back into the closure when the serializer can handle them
     $this->group->add(new ListView('choices', function (&$item) {
         $check = new \picon\Check('checkbox', $item->getModel());
         $item->add($check);
         $item->add(new \picon\FormComponentLabel('label', $check));
     }, new ArrayModel($this->getChoices())));
 }