Datatypes\Boolean\Editor::load PHP Метод

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

Load Boolean editor
public load ( ) : Zend\Form\Element\Checkbox
Результат Zend\Form\Element\Checkbox
    public function load()
    {
        $boolean = new Element\Checkbox($this->getName());
        $boolean->setLabel($this->getProperty()->getName());
        $boolean->setAttribute('class', 'input-checkbox');
        $boolean->setAttribute('id', 'boolean' . $this->getProperty()->getId());
        $boolean->setValue($this->getProperty()->getValue());
        return $boolean;
    }

Usage Example

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