Exemplo n.º 1
0
 public function __construct(array $attributes, array $templateVars)
 {
     parent::__construct($attributes);
     $this->id = $this->requiredAttribute('id');
     $this->name = $this->optionalAttribute('name', $this->id);
     $this->readOnly = $this->optionalAttribute('readOnly', false);
     $this->required = $this->optionalAttribute('required', false);
     // should it be here? mmm
     $this->initialize();
     $this->fromView($templateVars);
 }
Exemplo n.º 2
0
 public function __construct(Form $form, array $attributes)
 {
     parent::__construct($attributes);
     $this->form = $form;
     $this->action = $this->optionalAttribute('action', '');
 }
Exemplo n.º 3
0
 public function __construct(array $attributes)
 {
     parent::__construct($attributes);
     $this->text = $this->requiredAttribute('text');
     $this->initialize();
 }
Exemplo n.º 4
0
 public function __construct(array $attributes)
 {
     parent::__construct($attributes);
     $this->id = $this->requiredAttribute('id');
     $this->name = $this->optionalAttribute('name', $this->id);
 }