protected function onInitialize() { parent::onInitialize(); $this->selection = $this->getModelObject(); $this->group = new RadioGroup('choice', new PropertyModel($this, 'selection')); $this->add($this->group); //@todo add the type hint b/ack into the closure when the serializer can handle them $this->group->add(new ListView('choices', function (&$item) { $radio = new \picon\Radio('radio', $item->getModel()); $item->add($radio); $item->add(new \picon\FormComponentLabel('label', $radio)); }, new ArrayModel($this->getChoices()))); }
protected function onComponentTag(ComponentTag $tag) { $this->checkComponentTag($tag, 'select'); $tag->setTagType(new XmlTagType(XmlTagType::OPEN)); parent::onComponentTag($tag); }