public function __construct(AbsCmpFields $component, $label) { parent::__construct($component); $this->label = $label; $this->setClass($this->class . ' btn'); $this->type = 'button'; }
/** * @inheritDoc */ public function __construct(AbsCmpFields $component, $name) { if (!preg_match(IfcInputConstants::INPUT_NAME_REGEX, $name)) { throw new \InvalidArgumentException('Invalid parameter $name="' . $name . '" in ' . __METHOD__); } if ($component->getMenuPage()->getInputFieldByName($name)) { throw new \InvalidArgumentException('A field with the $name="' . $name . '" already registered'); } parent::__construct($component); $this->name = $name; $this->id = $name; $this->menuPageComponent->getMenuPage()->registerField($this); }
public function registerField(AbsField $field) { $this->fields[$field->getHashId()] = $field; }
/** * @param AbsField $field * * @return bool * @author Panagiotis Vagenas <*****@*****.**> * @since 1.0.0 */ public function hasField(AbsField $field) { return array_key_exists($field->getHashId(), $this->fields); }
public function __construct(AbsCmpFields $component) { parent::__construct($component); $this->setClass('col-md-12'); }