/** * Sets the menu bar instance * * @param ControllerToolbarInterface $toolbar * @return TemplateFilterToolbar */ public function setToolbar(ControllerToolbarInterface $toolbar) { $this->_toolbars[$toolbar->getType()] = $toolbar; return $this; }
/** * Detach a toolbar * * @param ControllerToolbarInterface $toolbar A toolbar instance * @return Object The mixer object */ public function detachToolbar(ControllerToolbarInterface $toolbar) { if ($this->hasToolbar($toolbar->getType())) { unset($this->_toolbars[$toolbar->getType()]); if ($this->inherits('Nooku\\Library\\CommandMixin')) { $this->getCommandChain()->dequeue($toolbar); } } return $this->getMixer(); }
/** * Create a recursive iterator from a toolbar * * @param ControllerToolbarInterface $toolbar * @return \RecursiveIterator */ protected static function _createInnerIterator(ControllerToolbarInterface $toolbar) { $iterator = new \RecursiveArrayIterator($toolbar->getIterator()); $iterator = new \RecursiveCachingIterator($iterator, \CachingIterator::TOSTRING_USE_KEY); return $iterator; }
/** * Remove a toolbar * * @param ControllerToolbarInterface $toolbar A toolbar instance * @return Object The mixer object */ public function removeToolbar(ControllerToolbarInterface $toolbar) { if ($this->hasToolbar($toolbar->getType())) { unset($this->__toolbars[$toolbar->getType()]); if ($this->inherits(__NAMESPACE__ . '\\CommandMixin')) { $this->removeCommandHandler($toolbar); } } return $this->getMixer(); }