Datatypes\Textstring\PrevalueEditor::load PHP Метод

load() публичный Метод

Load textstring prevalue editor
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;
    }

Usage Example

Пример #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testLoad()
 {
     $this->assertInstanceOf('Zend\\Form\\Element\\Text', $this->object->load());
 }
PrevalueEditor