public function __construct() { parent::__construct('resp-resource'); $this->setAttribute('method', 'post'); $this->add(new Element\Hidden('id_resp')); $id_resource = new Element\Select('id_resource'); $id_resource->setLabel('Resource')->setAttributes(array('class' => 'medwhite')); $this->add($id_resource); $nid_lov_controltype = new Element\Collection('nid_lov_controltype'); $nid_lov_controltype->setLabel('Control Type')->setAttributes(array('class' => 'medwhite')); $this->add($nid_lov_controltype); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'smallwhite')); $this->add($comment); $back = new Element\Button('back'); $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn-success', 'style' => 'margin-right:100px;', 'onclick' => '')); $this->add($back); $submit = new Element\Submit('submit'); $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn-success')); $this->add($submit); }
public function createService(ServiceLocatorInterface $serviceLocator) { $collection = new Collection('educations'); $collection->setLabel('Education history')->setCount(0)->setShouldCreateTemplate(true)->setAllowAdd(true)->setTargetElement($serviceLocator->get('EducationFieldset')); return $collection; }
public function testRendersCollectionAsExpected() { $element = new Element\Collection(); $element->setLabel('foo'); $markup = $this->helper->render($element); $this->assertContains('<legend>foo</legend>', $markup); }