コード例 #1
0
 public function __clone()
 {
     if ($this->htmlElement) {
         $this->htmlElement = clone $this->htmlElement;
     }
     foreach ($this->attributes as $key => $attribute) {
         if (is_object($attribute)) {
             $this->attributes[$key] = clone $attribute;
         }
     }
     parent::__clone();
 }
コード例 #2
0
ファイル: Selection.php プロジェクト: mesour/selection
 public function create($data = [])
 {
     parent::create();
     $main = $this->getMainCheckboxPrototype();
     $this->onRender($this);
     $dropdown = $this->getDropDown();
     $button = $dropdown->getMainButton();
     $button->setHtml($main);
     if (count($dropdown->getItems()) > 0) {
         $dropdown->addDivider();
     }
     $dropdown->addButton('Inverse selection')->setAttribute('href', '#')->setAttribute('data-status', 'm_-inverse');
     return $dropdown;
 }