public function getSwitcherButton() { if (!isset($this['button'])) { $this['button'] = $button = new Button(); $button->setText('Go!')->setType('primary')->setAttribute('href', '#')->setAttribute('data-page-button', $this->createLinkName()); } return $this['button']; }
protected function getStringFromOb(Button $button, $data = []) { ob_start(); $button->setOption('data', $data); echo $button->render(); $out = ob_get_contents(); ob_end_clean(); return $out; }
public function __construct($name = null, Mesour\Components\ComponentModel\IContainer $parent = null) { $this->defaults[self::WRAPPER]['attributes']['class'] = false; $this->defaults[self::WRAPPER]['attributes']['role'] = 'menuitem'; $this->defaults[self::WRAPPER]['attributes']['tabindex'] = '-1'; parent::__construct($name, $parent); }
public function __construct($name = null, Mesour\Components\ComponentModel\IContainer $parent = null) { $this->defaults[self::WRAPPER]['el'] = 'button'; $this->defaults[self::WRAPPER]['attributes']['data-dismiss'] = 'modal'; $this->setText('Close'); parent::__construct($name, $parent); }
public function __construct($name = null, Mesour\Components\ComponentModel\IContainer $parent = null) { $this->defaults[self::WRAPPER]['el'] = 'button'; $this->defaults[self::WRAPPER]['attributes']['data-toggle'] = 'dropdown'; parent::__construct($name, $parent); }