/**
  * Visit a menu organizer and return the menu GUI component that corresponds
  * to it.
  * 
  * @param object MenuOrganizerSiteComponent
  * @return object Component
  * @access public
  * @since 1/15/07
  */
 public function visitFlowOrganizer(FlowOrganizerSiteComponent $organizer)
 {
     if ($this->editModeVisitor->isHeaderOrFooter($organizer)) {
         return $organizer->acceptVisitor($this->editModeVisitor);
     } else {
         return parent::visitFlowOrganizer($organizer);
     }
 }
 /**
  * Visit a menu organizer and return the menu GUI component that corresponds
  * to it.
  * 
  * @param object MenuOrganizerSiteComponent
  * @return object Component
  * @access public
  * @since 1/15/07
  */
 public function visitMenuOrganizer(MenuOrganizerSiteComponent $organizer)
 {
     $guiContainer = parent::visitMenuOrganizer($organizer);
     // Add the "Append" form to the organizer
     $authZ = Services::getService("AuthZ");
     $idManager = Services::getService("Id");
     if ($authZ->isUserAuthorized($idManager->getId("edu.middlebury.authorization.add_children"), $organizer->getQualifierId())) {
         $allowed = array();
         $allowed[] = _("Pages and Sections");
         $allowed[] = new Type('segue-multipart', 'edu.middlebury', 'ContentPage_multipart');
         $allowed[] = new Type('segue-multipart', 'edu.middlebury', 'SubMenu_multipart');
         $allowed[] = new Type('segue-multipart', 'edu.middlebury', 'SidebarSubMenu_multipart');
         $allowed[] = new Type('segue-multipart', 'edu.middlebury', 'SidebarContentPage_multipart');
         // 		$allowed[] = new Type('segue', 'edu.middlebury', 'NavBlock');
         $allowed[] = _("Content Blocks");
         $pluginManager = Services::getService("PluginManager");
         $allowed = array_merge($allowed, $pluginManager->getEnabledPlugins());
         $formHtml = "\n\t<div class='ui2_add_form_wrapper'>";
         $formHtml .= $this->getAddFormHTML($organizer->getId(), null, $allowed, true);
         // Move/Copy from selection
         $formHtml .= "\n\t | " . Segue_Selection::instance()->getMoveCopyLink($organizer);
         $formHtml .= "\n\t</div>";
         $childComponent = $guiContainer->add($this->addFlowChildWrapper($organizer, $organizer->getTotalNumberOfCells(), new UnstyledMenuItem($formHtml, 2)), null, '100%', null, TOP);
         // Add a spacer at the end of the menu
         $guiContainer->add(new UnstyledMenuItem("<div> &nbsp; </div>"));
     }
     // Add controls bar and border
     $authZ = Services::getService("AuthZ");
     $idManager = Services::getService("Id");
     if ($authZ->isUserAuthorized($idManager->getId("edu.middlebury.authorization.modify"), $organizer->getQualifierId())) {
         $controlsHTML = $this->getBarPreHTML('#00F', $organizer) . $this->getControlsHTML($organizer, "<em>" . $this->_classNames['MenuOrganizer'] . "</em>", $organizer->acceptVisitor($this->_controlsVisitor), '#00F', '#99F', '#66F');
         $guiContainer->setPreHTML($controlsHTML . "\n<div style='z-index: 0;'>" . $guiContainer->getPreHTML($null = null));
         $guiContainer->setPostHTML($guiContainer->getPostHTML($null = null) . "</div>" . $this->getBarPostHTML());
     }
     return $guiContainer;
 }
 /**
  * Visit a flow organizer and return the resultant GUI component [a container].
  * 
  * @param object FlowOrganizerSiteComponent
  * @return object Component
  * @access public
  * @since 5/18/07
  */
 public function visitMenuOrganizer(MenuOrganizerSiteComponent $organizer)
 {
     if ($organizer->getId() == $this->_flowOrgId) {
         return $this->visitTargetBlock();
     } else {
         return parent::visitMenuOrganizer($organizer);
     }
 }