/** * Visit a Site Navigation Block * * @param object SiteNavBlockSiteComponent $siteComponent * @return mixed * @access public * @since 8/31/07 */ public function visitSiteNavBlock(SiteNavBlockSiteComponent $siteNavBlock) { $childOrganizer = $siteNavBlock->getOrganizer(); $childOrganizer->acceptVisitor($this); return $this->taggableItems; }
/** * Visit a Site Navigation Block * * @param object SiteNavBlockSiteComponent $siteComponent * @return mixed * @access public * @since 4/13/08 */ public function visitSiteNavBlock(SiteNavBlockSiteComponent $siteComponent) { return $siteComponent->getOrganizer()->acceptVisitor($this); }
/** * Visit a SiteNavBlock and return the site GUI component that corresponds to * it. * * @param object SiteNavBlockSiteComponent * @return object Component * @access public * @since 4/3/06 */ public function visitSiteNavBlock(SiteNavBlockSiteComponent $siteNavBlock) { // Traverse our child organizer, and place it in the _missingTargets array // if our target is not available. if ($siteNavBlock->isActive()) { $childOrganizer = $siteNavBlock->getOrganizer(); $childOrganizer->acceptVisitor($this); } return $this->visitSiteComponent($siteNavBlock); }
/** * Visit a Site Navigation Block * * @param object SiteNavBlockSiteComponent $siteComponent * @return mixed * @access public * @since 8/5/08 */ public function visitSiteNavBlock(SiteNavBlockSiteComponent $siteComponent) { if (!$this->firstSeen) { $this->firstSeen = true; } $siteComponent->getOrganizer()->acceptVisitor($this); }
/** * Visit a SiteNavBlock and return the site GUI component that corresponds to * it. * * @param object SiteNavBlockSiteComponent * @return object Component * @access public * @since 4/3/06 */ public function visitSiteNavBlock(SiteNavBlockSiteComponent $siteNavBlock) { // Traverse our child organizer, and place it in the _missingTargets array // if our target is not available. $childOrganizer = $siteNavBlock->getOrganizer(); $childGuiComponent = $childOrganizer->acceptVisitor($this); // Check completeness and render any nodes still waiting for targets try { foreach (array_keys($this->_missingTargets) as $targetId) { if (!isset($this->_emptyCellContainers[$targetId])) { throw new OperationFailedException("Target id '{$targetId}' was not found or is not empty.", 390134); } if (!is_object($this->_emptyCellContainers[$targetId])) { ob_start(); var_dump($this->_emptyCellContainers[$targetId]); throwError(new Error("Expecting object, found '" . ob_get_clean() . "'.", __CLASS__)); } if (isset($this->_missingTargetWidths[$targetId]) && $this->_missingTargetWidths[$targetId]) { $width = $this->_missingTargetWidths[$targetId]; } else { $width = null; } $this->_emptyCellContainers[$targetId]->insertAtPlaceholder($this->_emptyCellPlaceholders[$targetId], $this->_missingTargets[$targetId], $width, '100%', null, TOP); unset($this->_emptyCellContainers[$targetId]); unset($this->_emptyCellPlaceholders[$targetId]); unset($this->_missingTargets[$targetId]); unset($this->_missingTargetWidths[$targetId]); } } catch (OperationFailedException $e) { /********************************************************* * Try to allow recovery if we have just one * missing empty cell and one menu missing a target. *********************************************************/ if ($e->getCode() == 390134 && count($this->_missingTargets) == 1 && count($this->_emptyCellContainers) == 1) { print "<div class='error'>"; printpre("Inconsistant state. Looking for empty cell: "); printpre(array_keys($this->_missingTargets)); printpre("Found empty cell: "); printpre(array_keys($this->_emptyCellContainers)); print "Using arrange mode, drag the Layout container for your section/page to fix this state."; print "Please report what you did to cause this state at the <a href='https://sourceforge.net/tracker/index.php?func=detail&aid=2046491&group_id=82171&atid=565234'>bug tracker</a> or to Adam Franco (afranco@middlebury.edu)."; print "</div>"; $emptyCellId = key($this->_emptyCellContainers); $targetId = key($this->_missingTargets); if (!is_object($this->_emptyCellContainers[$emptyCellId])) { ob_start(); var_dump($this->_emptyCellContainers[$emptyCellId]); throwError(new Error("Expecting object, found '" . ob_get_clean() . "'.", __CLASS__)); } if (isset($this->_missingTargetWidths[$targetId]) && $this->_missingTargetWidths[$targetId]) { $width = $this->_missingTargetWidths[$targetId]; } else { $width = null; } $this->_emptyCellContainers[$emptyCellId]->insertAtPlaceholder($this->_emptyCellPlaceholders[$emptyCellId], $this->_missingTargets[$targetId], $width, '100%', null, TOP); unset($this->_emptyCellContainers[$emptyCellId]); unset($this->_emptyCellPlaceholders[$emptyCellId]); unset($this->_missingTargets[$targetId]); unset($this->_missingTargetWidths[$targetId]); } else { throw $e; } } // returning the entire site in GUI component object tree. return $childGuiComponent; }