public load ( ) : Zend\Form\Element\Text | ||
Результат | Zend\Form\Element\Text |
public function load()
{
$config = $this->getConfig();
$length = new Element\Text('length');
$length->setAttributes(array('value' => isset($config['length']) ? $config['length'] : '', 'class' => 'form-control', 'id' => 'length'));
$length->setOptions(array('label' => 'Length', 'label_attributes' => array('class' => 'required control-label col-lg-2')));
return $length;
}
/** * Test * * @return void */ public function testLoad() { $this->assertInstanceOf('Zend\\Form\\Element\\Text', $this->object->load()); }