function setLabel($_label) { $this->label = $_label; parent::setLabel($_label); return $this; }
public static function Factory($name, $label = '', $attrList = array()) { $element = new Button($name); $element->setLabel($label); $element->setOptionList($attrList); return $element; }
/** * @param string $name * @return Button * @throws DuplicateButtonException */ protected function addButton($name, $label = NULL) { if ($name == self::ROW_FORM) { $button = new Button($this['buttons'], $name); $self = $this; $primaryKey = $this->primaryKey; $button->setLink(function ($row) use($self, $primaryKey) { return $self->link("showRowForm!", $row[$primaryKey]); }); } else { if (!empty($this['buttons']->components[$name])) { throw new DuplicateButtonException("Button {$name} already exists."); } $button = new Button($this['buttons'], $name); } $button->setLabel($label); return $button; }