Menu classes added, unfinished
authorRoland Häder <roland@mxchange.org>
Tue, 24 Mar 2009 11:09:28 +0000 (11:09 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 24 Mar 2009 11:09:28 +0000 (11:09 +0000)
.gitattributes
inc/classes/main/commands/web/class_WebConfirmCommand.php
inc/classes/main/commands/web/class_WebHomeCommand.php
inc/classes/main/commands/web/class_WebLoginAreaCommand.php
inc/classes/main/commands/web/class_WebLoginCommand.php
inc/classes/main/commands/web/class_WebLoginFailedCommand.php
inc/classes/main/commands/web/class_WebLogoutDoneCommand.php
inc/classes/main/commands/web/class_WebRegisterCommand.php
inc/classes/main/menu/.htaccess [new file with mode: 0644]
inc/classes/main/menu/class_BaseMenu.php [new file with mode: 0644]

index ccdfe9fdcb67204d3b7d3781df0edbef59eae6ba..4b84788bfab82dfed7b94cb449813fbad89812f2 100644 (file)
@@ -388,6 +388,8 @@ inc/classes/main/mailer/class_ -text
 inc/classes/main/mailer/class_BaseMailer.php -text
 inc/classes/main/mailer/debug/.htaccess -text
 inc/classes/main/mailer/debug/class_DebugMailer.php -text
 inc/classes/main/mailer/class_BaseMailer.php -text
 inc/classes/main/mailer/debug/.htaccess -text
 inc/classes/main/mailer/debug/class_DebugMailer.php -text
+inc/classes/main/menu/.htaccess -text
+inc/classes/main/menu/class_BaseMenu.php -text
 inc/classes/main/output/.htaccess -text
 inc/classes/main/output/class_ConsoleOutput.php -text
 inc/classes/main/output/class_WebOutput.php -text
 inc/classes/main/output/.htaccess -text
 inc/classes/main/output/class_ConsoleOutput.php -text
 inc/classes/main/output/class_WebOutput.php -text
index 5158794d337700d6d9aa97dc0c67e1c486581fec..090dbad97c609f2a5535f618b1443e6cff997891 100644 (file)
@@ -104,6 +104,10 @@ class WebConfirmCommand extends BaseCommand implements Commandable {
                // Set username
                $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USERNAME));
 
                // Set username
                $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USERNAME));
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('confirm_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index e082900c1d1b2735df6c0ebe40f9dd46bb6d189f..56e112efccce88a8de1bca65accd17e312a78a9d 100644 (file)
@@ -95,6 +95,10 @@ class WebHomeCommand extends BaseCommand implements Commandable {
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_home_title'));
 
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_home_title'));
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('home_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index 48ea537e3ebd0d146b1c9717849bc658895e1c58..673858d8facfd72bf5c0bc8c239150019aa53dac 100644 (file)
@@ -132,6 +132,10 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage($this->actionName . '_title'));
 
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage($this->actionName . '_title'));
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('login_area_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index e1c314b13192bb0976419fb57c1a0a6bde58e566..0f6758f69bce0423d351e9ca4c9eecd85f204506 100644 (file)
@@ -98,6 +98,10 @@ class WebLoginCommand extends BaseCommand implements Commandable {
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_login_title'));
 
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_login_title'));
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('login_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index 4a4a5a5344f9aacce8f4a9c6f95c674f0929ff6c..1e39413bebdb9fc0617e49486a1bf1e8b2b2b3b8 100644 (file)
@@ -98,6 +98,10 @@ class WebLoginFailedCommand extends BaseCommand implements Commandable {
                // Assign base URL
                $templateInstance->assignConfigVariable('base_url');
 
                // Assign base URL
                $templateInstance->assignConfigVariable('base_url');
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('login_failed_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index fa11b02c9202f75782bd845e346c0137b2508e5a..123764831d89787f89bebe9f02c631a4469d7363 100644 (file)
@@ -98,6 +98,10 @@ class WebLogoutDoneCommand extends BaseCommand implements Commandable {
                // Assign base URL
                $templateInstance->assignConfigVariable('base_url');
 
                // Assign base URL
                $templateInstance->assignConfigVariable('base_url');
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('logout_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
index b8c858e5cd12b418e34f29b1c5fc8242fb12d030..d72a3acd885cbb9e488aabf8eef49e2d77591497 100644 (file)
@@ -102,6 +102,10 @@ class WebRegisterCommand extends BaseCommand implements Commandable, Registerabl
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_register_title'));
 
                // Set title
                $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_register_title'));
 
+               // Construct the menu in every command. We could do this in BaseCommand class. But this means
+               // *every* command has a navigation system and that is want we don't want.
+               $menuInstance = ObjectFactory::createObjectByConfiguredName('register_menu_class', array($appInstance));
+
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
                // ... and all variables. This should be merged together in a pattern
                // to make things easier. A cache mechanism should be added between
                // these two calls to cache compiled templates.
diff --git a/inc/classes/main/menu/.htaccess b/inc/classes/main/menu/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/menu/class_BaseMenu.php b/inc/classes/main/menu/class_BaseMenu.php
new file mode 100644 (file)
index 0000000..4c7c18c
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * A general menu system class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseMenu extends BaseFrameworkSystem {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+}
+
+// [EOF]
+?>