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(); }
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; }