Nette\Forms\Controls\ChoiceControl::__construct PHP Метод

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

public __construct ( $label = NULL, array $items = NULL )
$items array
    public function __construct($label = NULL, array $items = NULL)
    {
        parent::__construct($label);
        if ($items !== NULL) {
            $this->setItems($items);
        }
    }

Usage Example

Пример #1
0
 /**
  * @param  string  label
  * @param  array   options from which to choose
  */
 public function __construct($label = NULL, array $items = NULL)
 {
     parent::__construct($label, $items);
     $this->control->type = 'radio';
     $this->container = Html::el();
     $this->separator = Html::el('br');
 }
All Usage Examples Of Nette\Forms\Controls\ChoiceControl::__construct