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); }
public function __construct(Form $form, array $attributes) { parent::__construct($attributes); $this->form = $form; $this->action = $this->optionalAttribute('action', ''); }
public function __construct(array $attributes) { parent::__construct($attributes); $this->text = $this->requiredAttribute('text'); $this->initialize(); }
public function __construct(array $attributes) { parent::__construct($attributes); $this->id = $this->requiredAttribute('id'); $this->name = $this->optionalAttribute('name', $this->id); }