From: Roland Häder Date: Mon, 9 Nov 2009 02:16:12 +0000 (+0000) Subject: Handling of nodes fixed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a4b7046ac734803b54820d87681846ea7eaa21e;p=core.git Handling of nodes fixed --- diff --git a/inc/classes/main/template/menu/class_MenuTemplateEngine.php b/inc/classes/main/template/menu/class_MenuTemplateEngine.php index 0c4f317a..2cfb5eb4 100644 --- a/inc/classes/main/template/menu/class_MenuTemplateEngine.php +++ b/inc/classes/main/template/menu/class_MenuTemplateEngine.php @@ -27,19 +27,19 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla */ private $mainNodes = array( 'block-list', - 'header', - 'entry-list', - 'footer', ); /** * Sub nodes in the XML tree */ private $subNodes = array( - 'block', + 'entry-list', + 'entry', 'entries-content', + 'header', + 'footer', + 'block', 'title', - 'entry', 'anchor', 'design', 'text', @@ -206,13 +206,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla //* DEBUG: */ echo "START: >".$element."<
\n"; if (in_array($element, $this->getMainNodes())) { // Okay, main node found! - $methodName = 'startMenu' . $this->convertToClassName($element); + $methodName = 'start' . $this->convertToClassName($element); // Set it $this->setCurrMainNode($element); } elseif (in_array($element, $this->getSubNodes())) { // Sub node found - $methodName = 'startMenu' . $this->convertToClassName($element); + $methodName = 'start' . $this->convertToClassName($element); } elseif ($element != 'menu') { // Invalid node name found throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN); @@ -342,7 +342,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @param $templateDepency A template to load to satisfy depencies * @return void */ - private function startMenuEntries ($templateDepency = '') { + private function startEntryList ($templateDepency = '') { // Handle the depency template $this->handleTemplateDepency('entries', $templateDepency); @@ -361,7 +361,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * * @return void */ - private function finishEntries () { + private function finishEntryList () { // Load the header template for this page $this->getTemplateInstance()->loadCodeTemplate('menu_entries_end'); @@ -377,7 +377,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * * @return void */ - private function startMenuHeader () { + private function startHeader () { // Do we have a template instance? if (is_null($this->getTemplateInstance())) { // Init template instance for underlaying web templates @@ -418,7 +418,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * * @return void */ - private function startMenuFooter () { + private function startFooter () { // Do we have a template instance? if (is_null($this->getTemplateInstance())) { // Init template instance for underlaying web templates @@ -461,7 +461,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @param $class The title to add to the menu * @return void */ - private function startMenuTitle ($id, $class) { + private function startTitle ($id, $class) { // Set id as current $this->curr['id'] = $id; @@ -496,7 +496,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * * @return void */ - private function startMenuText () { + private function startText () { // Do we have a template instance? if (is_null($this->getTemplateInstance())) { // Init template instance for underlaying web templates @@ -538,7 +538,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @param $id Id of the menu * @return void */ - private function startMenuEntry ($id) { + private function startEntry ($id) { // Set id as current $this->curr['entry_id'] = $id; @@ -575,7 +575,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @param $title Link title of the anchor * @return void */ - private function startMenuAnchor ($id, $link, $title) { + private function startAnchor ($id, $link, $title) { $this->partialStub('id='.$id.',link='.$link.',title='.$title); }