setItem($item); $this->setControl($control); } /** * Set the Item Control * * @param Control $item Item Control in the Menu Bar * @return \FML\Script\Features\MenuElement */ public function setItem(Control $item) { $item->checkId(); if ($item instanceof Scriptable) { $item->setScriptEvents(true); } $this->item = $item; return $this; } /** * Get the Item Control * * @return \FML\Controls\Control */ public function getItem() { return $this->item; } /** * Set the Menu Control * * @param Control $control Toggled Menu Control * @return \FML\Script\Features\MenuElement */ public function setControl(Control $control) { $control->checkId(); $this->control = $control; return $this; } /** * Get the Menu Control * * @return \FML\Controls\Control */ public function getControl() { return $this->control; } }