Example #1
0
 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'];
 }
Example #2
0
 protected function getStringFromOb(Button $button, $data = [])
 {
     ob_start();
     $button->setOption('data', $data);
     echo $button->render();
     $out = ob_get_contents();
     ob_end_clean();
     return $out;
 }
Example #3
0
 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);
 }
Example #4
0
 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);
 }
Example #5
0
 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);
 }