示例#1
0
 /**
  * Sets the menu bar instance
  *
  * @param KControllerToolbarInterface $toolbar
  * @return ComKoowaTemplateFilterToolbar
  */
 public function setToolbar(KControllerToolbarInterface $toolbar)
 {
     $this->_toolbars[$toolbar->getType()] = $toolbar;
     return $this;
 }
示例#2
0
 /**
  * Remove a toolbar
  *
  * @param   KControllerToolbarInterface $toolbar A toolbar instance
  * @return  Object The mixer object
  */
 public function removeToolbar(KControllerToolbarInterface $toolbar)
 {
     if ($this->hasToolbar($toolbar->getType())) {
         unset($this->__toolbars[$toolbar->getType()]);
         if ($this->inherits('KCommandMixin')) {
             $this->removeCommandHandler($toolbar);
         }
     }
     return $this->getMixer();
 }