Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / menu / class_BaseMenu.php
index fb30996..642a01b 100644 (file)
@@ -1,11 +1,14 @@
 <?php
 // Own namespace
-namespace CoreFramework\Menu;
+namespace Org\Mxchange\CoreFramework\Menu;
 
 // Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Object\BaseFrameworkSystem;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 
 /**
  * A general menu system class
@@ -29,7 +32,7 @@ use CoreFramework\Template\CompileableTemplate;
  * 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 {
+abstract class BaseMenu extends BaseFrameworkSystem {
        /**
         * Protected constructor
         *
@@ -58,12 +61,12 @@ class BaseMenu extends BaseFrameworkSystem {
                $templateInstance->loadMenuTemplate('generic_menu_entries');
 
                // Get the 'command' from request instance
-               $command = $this->getApplicationInstance()->getRequestInstance()->getRequestElement('command');
+               $command = FrameworkBootstrap::getRequestInstance()->getRequestElement('command');
 
                // If page is empty, choose default
                if (empty($command)) {
                        // Use default page as none has been specified
-                       $command = $this->getConfigInstance()->getConfigEntry('default_' . $this->getApplicationInstance()->getAppShortName() . '_' . self::getResponseTypeFromSystem() . '_command');
+                       $command = $this->getConfigInstance()->getConfigEntry('default_' . GenericRegistry::getRegistry()->getInstance('app')->getAppShortName() . '_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command');
                } // END - if
 
                // Load the menu template for this page