walk the menu tree
and invoke service to append dynamic menu entries

@param Menu $m
@throws \vxPHP\Application\Exception\ApplicationException
761785
protected function completeMenu(Menu $m) {
		
		if($m->getType() === 'dynamic') {

			// invoke service to build menu entries
			
			Application::getInstance()->getService($m->getServiceId())->appendMenuEntries($m);

			
		}

		foreach($m->getEntries() as $entry) {
			if(($m = $entry->getSubMenu())) {
				$this->completeMenu($m);
			}
		}

	}
1150686
public function appAction() {
        $name = ucfirst($this->getFirstParamOrAsk('Enter application\'s name'));;
        FSService::makeWritable(DC::getEnvironment()->getApplicationRoot() . $name);
        $this->createCV(array(
            'name' => 'Index',
            'app'  => $name,
        ));
        $appPath = DC::getEnvironment()->getApplicationRoot() . $name . '/';
        $this->safeCreateFromTemplate($appPath . 'Views/_layout.slot', '_view_layout', array('app'=>$name));
        $this->safeCreateFromTemplate($appPath . 'config.yml', '_app_config', array('app'=>$name));
        $config = DC::getProjectConfig();
        if (!$config->has('applications/'.strtolower($name))) {
            $config->set('applications/'.strtolower($name), strtolower($name));
            $this->notify('added information to project.yml', '+ config');
            $config->save();
        }
    }
787062
protected function clearSelectedMenuEntries(Menu $menu) {

		while(($e = $menu->getSelectedEntry())) {

			// dynamic menus come either with unselected entry or have a selected entry explicitly set

			if($menu->getType() == 'static') {
				$menu->clearSelectedEntry();
			}
			if(!($menu = $e->getSubMenu())) {
				break;
			}
		}
	}
146700
private static function init() {
        self::$appContext = new AppContext(self::$config);

        if (isset(self::$config['customHandlers'])) {
            if (is_callable(self::$config['customHandlers'])) {
                call_user_func(self::$config['customHandlers'], self::$appContext);
            }
            else {
                throw new \Exception('Function is expected.');
            }
        }

        self::invokeAll(self::$appContext->getPreInit(), array(self::$appContext));

        $config = self::$appContext->getConfig();

        if (empty($config['appNamespace'])) {
            throw new \Exception('The root namespace for the application is required. To specify the namespace of your application, use the useNamespace method. The value must not be null or empty.');
        }

        if (empty($config['basePath'])) {
            $config['basePath'] = getcwd();
        }

        if (!defined('PHPMVC_DS')) { define('PHPMVC_DS', DIRECTORY_SEPARATOR); }
        if (!defined('PHPMVC_ROOT_PATH')) { define('PHPMVC_ROOT_PATH', $config['basePath'] . PHPMVC_DS); }
        if (!defined('PHPMVC_CORE_PATH')) { define('PHPMVC_CORE_PATH', __DIR__ .PHPMVC_DS); }
        if (!defined('PHPMVC_CONFIG_PATH')) { define('PHPMVC_CONFIG_PATH', PHPMVC_ROOT_PATH . 'config' . PHPMVC_DS); }
        if (!defined('PHPMVC_FILTER_PATH')) { define('PHPMVC_FILTER_PATH', PHPMVC_ROOT_PATH . 'filters' . PHPMVC_DS); }
        if (!defined('PHPMVC_CONTROLLER_PATH')) { define('PHPMVC_CONTROLLER_PATH', PHPMVC_ROOT_PATH . 'controllers' . PHPMVC_DS); }
        if (!defined('PHPMVC_MODEL_PATH')) { define('PHPMVC_MODEL_PATH', PHPMVC_ROOT_PATH . 'models' . PHPMVC_DS); }
        if (!defined('PHPMVC_VIEW_PATH')) { define('PHPMVC_VIEW_PATH', PHPMVC_ROOT_PATH . 'views' . PHPMVC_DS); }
        if (!defined('PHPMVC_SHARED_PATH')) { define('PHPMVC_SHARED_PATH', PHPMVC_VIEW_PATH . 'shared' . PHPMVC_DS); }
        if (!defined('PHPMVC_UPLOAD_PATH')) { define('PHPMVC_UPLOAD_PATH', PHPMVC_ROOT_PATH . 'upload' . PHPMVC_DS); }

        if (!defined('PHPMVC_APP_NAMESPACE')) {
            define('PHPMVC_APP_NAMESPACE', $config['appNamespace']);
        }
        elseif (PHPMVC_APP_NAMESPACE !== $config['appNamespace']) {
            throw new \Exception('Constant PHPMVC_CONTROLLER already defined. Re-define with other value is not possible.');
        }

        if (empty($config['routeProvider'])) {
            $config['routeProvider'] = new DefaultRouteProvider();
        }
        elseif (!$config['routeProvider'] instanceof RouteProvider) {
            throw new \Exception('The routeProvider type must be the base of "\PhpMvc\RouteProvider".');
        }

        $config['routeProvider']->init();

        if (isset($config['routes'])) {
            if (is_callable($config['routes'])) {
                $config['routes']($config['routeProvider']);
            }
            elseif (is_array($config['routes'])) {
                $provider = $config['routeProvider'];

                foreach($config['routes'][0] as $route) {
                    $provider->add($route->name, $route->template, $route->defaults, $route->constraints);
                }

                if (count($config['routes']) > 1) {
                    foreach($config['routes'][1] as $route) {
                        $provider->ingnore($route->template, $route->constraints);
                    }
                }
            }
            elseif ($config['routes'] instanceof RouteCollection) {
                $provider = $config['routeProvider'];

                foreach($config['routes'] as $route) {
                    $provider->add($route->name, $route->template, $route->defaults, $route->constraints);
                }
            }
        }

        if (empty($config['cacheProvider'])) {
            $config['cacheProvider'] = new IdleCacheProvider();
        }
        elseif (!$config['cacheProvider'] instanceof CacheProvider) {
            throw new \Exception('The $cacheProvider type must be the base of "\PhpMvc\CacheProvider".');
        }

        $config['cacheProvider']->init();

        if (isset($config['sessionProvider'])) {
            if ($config['sessionProvider'] === true) {
                $config['sessionProvider'] = new HttpSession();
            }
            elseif (!$config['sessionProvider'] instanceof HttpSessionProvider) {
                throw new \Exception('The $sessionProvider type must be the base of "\PhpMvc\HttpSessionProvider".');
            }

            $config['sessionProvider']->init();
        }

        if (empty($config['httpContext'])) {
            $info = new HttpContextInfo();
            $info->routeProvider = $config['routeProvider'];
            $info->cacheProvider = $config['cacheProvider'];
            $info->request = new HttpRequest();
            $info->response = new HttpResponse();
            $info->session = isset($config['sessionProvider']) ? $config['sessionProvider'] : null;

            $config['httpContext'] = new HttpContext($info);
        }
        elseif (!$config['httpContext'] instanceof HttpContextBase) {
            throw new \Exception('The httpContext type must be the base of "\PhpMvc\HttpContextBase".');
        }

        // default response handlers
        $response = $config['httpContext']->getResponse();

        $response->setEndHandler(function() use ($config) {
            self::invokeAll(self::$appContext->getEnd(), array(new ActionContext($config['httpContext'])));
        });

        $response->setPreSendHandler(function() use ($config) {
            self::invokeAll(self::$appContext->getPreSend(), array(new ActionContext($config['httpContext'])));
        });

        // set context and config, and invoke init handlers
        InternalHelper::setStaticPropertyValue('\\PhpMvc\\HttpContext', 'current', $config['httpContext']);

        self::$appContext->setConfig($config);
        self::invokeAll(self::$appContext->getInit(), array(self::$appContext));
        self::$config = self::$appContext->getConfig();
    }
267147
public static function applicationMenuLinks()
    {
        $applicationMenuLinks = [
          [
            'label' => 'Menu',
            'link' => self::removeDomainFromLink(action(Routes::backend("MenuController@single"), ['lang' =>  App::getLocale(), 'view' => 'list', 'menuID' => Menu::getPrimaryMenuID()])),
            'module' =>  'menu',
            'icon' => 'fa fa-bars',
            'access' => User::hasAccess("Menu", "read"),
            'children' => '',
          ],
          [
            'label' => 'Users',
            'link' =>  '',
            'module' =>  'user',
            'icon' => 'fa fa-users',
            'access' => User::hasAccess("User", "read"),
            'children' => [
              [
                'label' => 'List',
                'link' => self::removeDomainFromLink(action(Routes::backend("UserController@index"), ['lang' =>  App::getLocale(), 'view' => 'list'])),
                'icon' => '',
                'access' => User::hasAccess("User", "read"),
                'children' => '',
              ],
              [
                'label' => 'Add new',
                'link' => self::removeDomainFromLink(action(Routes::backend("UserController@index"), ['lang' =>  App::getLocale(), 'view' => 'create'])),
                'icon' => '',
                'access' => User::hasAccess("User", "create"),
                'children' => '',
              ],
              [
                'label' => 'Permissions',
                'link' => self::removeDomainFromLink(action(Routes::backend("PermissionController@index"), ['lang' =>  App::getLocale(), 'view' => 'list'])),
                'icon' => '',
                'access' => User::hasAccess('Permission', "read"),
                'children' => '',
              ]
            ],
          ],
          [
            'label' => 'Post types',
            'link' =>  '',
            'module' =>  'post-type',
            'icon' => 'fa fa-plus-square-o',
            'access' => User::hasAccess("PostType", "read"),
            'children' => [
              [
                'label' => 'List',
                'link' => self::removeDomainFromLink(action(Routes::backend("PostTypeController@index"), ['lang' =>  App::getLocale(), 'view' => 'list'])),
                'icon' => '',
                'access' => User::hasAccess("PostType", "read"),
                'children' => '',
              ],
              [
                'label' => 'Add new',
                'link' =>  self::removeDomainFromLink(action(Routes::backend("PostTypeController@index"), ['lang' =>  App::getLocale(), 'view' => 'create'])),
                'icon' => '',
                'access' => User::hasAccess("PostType", "create"),
                'children' => '',
              ]
            ],
          ],
          [
            'label' => 'Custom fields',
            'link' =>  '',
            'module' => 'custom-fields',
            'icon' => 'fa fa-plus-square-o',
            'access' => User::hasAccess("CustomField", "read"),
            'children' => [
              [
                'label' => 'List',
                'link' => self::removeDomainFromLink(action(Routes::backend("CustomFieldController@index"), ['lang' =>  App::getLocale(), 'view' => 'list'])),
                'icon' => '',
                'access' => User::hasAccess("CustomField", "read"),
                'children' => '',
              ],
              [
                'label' => 'Add new',
                'link' =>  self::removeDomainFromLink(action(Routes::backend("CustomFieldController@index"), ['lang' =>  App::getLocale(), 'view' => 'create'])),
                'icon' => '',
                'access' => User::hasAccess("CustomField", "create"),
                'children' => '',
              ]
            ],
          ],
          [
            'label' => 'Media',
            'link' => self::removeDomainFromLink(action(Routes::backend("MediaController@index"), ['lang' =>  App::getLocale(), 'view' => 'library'])),
            'module' => 'media',
            'icon' => 'fa fa-camera',
            'access' => true,
            'children' => '',
          ],
          [
            'label' => 'Settings',
            'link' => self::removeDomainFromLink(action(Routes::backend("SettingsController@index"), ['lang' =>  App::getLocale(), 'view' => 'general'])),
            'module' => 'project-settings',
            'icon' => 'fa fa-cogs',
            'access' => User::hasAccess('Settings', "read"),
            'children' => '',
          ],
          [
            'label' => 'Language',
            'link' => self::removeDomainFromLink(action(Routes::backend("LanguageController@index"), ['lang' =>  App::getLocale(), 'view' => 'list'])),
            'icon' => 'fa fa-language',
            'module' => 'language',
            'access' => User::hasAccess('Language', "read"),
            'children' => '',
          ]
        ];

        foreach (PostType::all() as $postType){
            if(!$postType->isVisible) {
                continue;
            }

            $tmp = [
              'label' => $postType->name,
              'link' =>  '',
              'module' => $postType['slug'],
              'icon' => 'fa fa-thumb-tack',
              'access' => User::hasAccess($postType['slug'], "read"),
              'children' => [
                [
                  'label' => 'List',
                  'link' =>  self::removeDomainFromLink(action(Routes::backend("PostController@postsIndex"), ['lang' =>  App::getLocale(), 'post_type' => $postType['slug'], 'view' => 'list' ])),
                  'icon' => '',
                  'access' => User::hasAccess($postType['slug'], "read"),
                  'children' => '',
                ],
                [
                  'label' => 'Add new',
                  'link' => self::removeDomainFromLink(action(Routes::backend("PostController@postsIndex"), ['lang' =>  App::getLocale(), 'post_type' => $postType['slug'], 'view' => 'create' ])),
                  'icon' => '',
                  'access' => User::hasAccess($postType['slug'], "create"),
                  'children' => '',
                ],
                [
                  'label' => 'Categories',
                  'link' => self::removeDomainFromLink(action(Routes::backend("PostTypeController@single"), ['lang' =>  App::getLocale(), 'view' => 'categorylist', 'id' => $postType['postTypeID'] ])),
                  'icon' => '',
                  'access' => (User::hasAccess('Category', "read") && $postType['hasCategories']),
                  'children' => '',
                ],
                [
                  'label' => 'Tags',
                  'link' => self::removeDomainFromLink(action(Routes::backend("PostTypeController@single"), ['lang' =>  App::getLocale(), 'view' => 'taglist', 'id' => $postType['postTypeID'] ])),
                  'icon' => '',
                  'access' => (User::hasAccess('Tag', "read") && $postType['hasTags']),
                  'children' => '',
                ],
              ]
            ];
            array_unshift($applicationMenuLinks, $tmp);
        }

        $plugins = Plugin::activePlugins();
        if(count($plugins)) {
            // get plugins links
            $tmpPluginLinks = [
              'label' => "Plugins",
              'link' =>  '',
              'module' => "plugins",
              'icon' => 'fa fa-thumb-tack',
              'access' => User::hasAccess("Plugin", "read"),
              'children' => [],
            ];

            foreach ($plugins as $plugin) {
                $title = str_replace('/', "_", $plugin->namespace);
                $app = str_slug($title, '_');

                $tmpPluginLinks['children'][] = [
                  'label' => $plugin->title,
                  'link' => self::removeDomainFromLink($plugin->fullBackendUrl()),
                  'icon' => '',
                  'access' => User::hasAccess($app, "read"),
                  'children' => '',
                  'module' => "plugins",
                ];

            }
            $applicationMenuLinks[] = $tmpPluginLinks;
        }


        return $applicationMenuLinks;
    }
162328
public void createMenu(int menuId){
        mToolbar.inflateMenu(menuId);
        mMenuDataChanged = true;
        if(mAppCompatDelegate == null)
            onPrepareMenu();
    }
1128509
public function init(ModuleManagerInterface $manager)
    {
        if (!$manager instanceof ModuleManager) {
            $errMsg =sprintf('Module manager not implement %s', ModuleManager::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }

        
        /** @var ServiceLocatorInterface $sm */
        $sm = $manager->getEvent()->getParam('ServiceManager');

        if (!$sm instanceof ServiceLocatorInterface) {
            $errMsg = sprintf('Service locator not implement %s', ServiceLocatorInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }
        /** @var ServiceListenerInterface $serviceListener */
        $serviceListener = $sm->get('ServiceListener');
        if (!$serviceListener instanceof ServiceListenerInterface) {
            $errMsg = sprintf('ServiceListener not implement %s', ServiceListenerInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }


        $serviceListener->addServiceManager(
            EntryNameResolverManagerInterface::class,
            EntryNameResolverManager::CONFIG_KEY,
            EntryNameResolverProviderInterface::class,
            'getEntryNameResolverConfig'
        );

    }
155404
public function add(): void
    {
        $menu = $this->Menus->newEntity();
        if ($this->request->is('post')) {
            $data = (array)$this->request->getData();
            $menu = $this->Menus->patchEntity($menu, $data);
            if ($this->Menus->save($menu)) {
                $this->Flash->success((string)__('The menu has been saved.'));
                $this->redirect(['action' => 'index']);

                return;
            } else {
                $this->Flash->error((string)__('The menu could not be saved. Please, try again.'));
            }
        }
        $this->set('navMenu', $menu);
        $this->set('_serialize', ['navMenu']);
    }
178892
private function appendMenuEntries(\DOMNodeList $entries, Menu $menu) {

		foreach($entries as $entry) {

			if($entry->nodeType !== XML_ELEMENT_NODE || 'menuentry' !== $entry->nodeName) {
				continue;
			}

			// read additional attributes which are passed to menu entry constructor

			$attributes = [];

			foreach($entry->attributes as $attr) {

				$nodeName = $attr->nodeName;

				if(!in_array($nodeName, ['page', 'path', 'auth', 'auth_parameters'])) {
					$attributes[$attr->nodeName] = $attr->nodeValue;
				}

			}

			if('menuentry' === $entry->nodeName) {

				$page = $entry->getAttribute('page');
				$path = $entry->getAttribute('path');

				if($page && $path) {

					throw new ConfigException(sprintf("Menu entry with both page ('%s') and path ('%s') attribute found.", $page, $path));

				}

				// menu entry comes with a path attribute (which can also link an external resource)

				if($path) {

					$local = strpos($path, '/') !== 0 && !preg_match('~^[a-z]+://~', $path);

					$e = new MenuEntry($path, $attributes, $local);

				}

				// menu entry comes with a page attribute, in this case the route path is used

				else if($page) {

					if(!isset($this->routes[$menu->getScript()][$page])) {

						throw new ConfigException(sprintf(
							"No route for menu entry ('%s') found. Available routes for script '%s' are '%s'.",
							$page,
							$menu->getScript(),
							empty($this->routes[$menu->getScript()]) ? 'none' : implode("', '", array_keys($this->routes[$menu->getScript()]))
						));

					}

					$e = new MenuEntry((string) $this->routes[$menu->getScript()][$page]->getPath(), $attributes, true);

				}

				// handle authentication settings of menu entry

				if(($auth = strtolower(trim($entry->getAttribute('auth'))))) {

					// set optional authentication level

					$e->setAuth($auth);

					// if auth level is defined, additional authentication parameters can be set

					if(($authParameters = $entry->getAttribute('auth_parameters'))) {
						$e->setAuthParameters($authParameters);
					}

				}

				$menu->appendEntry($e);

				$submenu = (new \DOMXPath($entry->ownerDocument))->query('menu', $entry); 

				if($submenu->length) {
					$e->appendMenu($this->parseMenu($submenu->item(0)));
				}

			}

			else if($entry->nodeName === 'menuentry_placeholder') {

				$e = new DynamicMenuEntry(null, $attributes);
				$menu->appendEntry($e);

			}
		}
	}
824376
public function afterAdd($p, $m)
    {
        if ($p->titleForModel) {
            $m->title_field = $p->titleForModel;
        }

        foreach ($this->fieldsForModel as $field=>$def) {
            if ($m->hasField($field)) {
                continue;
            }

            // add new field
            $m->addField($field, $def);
        }
    }
213314
public Menu add(Menu m) {
        submenus.add(m);
        m.setParent(this);
        return m;
    }
551757
public static JMenuItem addMenuItem (
        ActionListener l, JMenu menu, String name)
    {
        return addMenuItem(l, menu, name, null, null);
    }
835698
public function actionGetMenus()
    {
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['index']);
        }
        try{
            return Menu::getMenuSource();
        }catch(Exception $e){
            throw new Exception($e);
        }
    }
282637
public function load(ObjectManager $manager)
    {
        /**
         * @var ObjectDirector $menuDirector
         */
        $menuDirector = $this->getDirector('menu');

        /**
         * Admin menu.
         */
        $menuAdmin = $menuDirector
            ->create()
            ->setCode('menu-admin')
            ->setEnabled(true)
            ->addSubnode($this->getReference('menu-node-vogue'));

        $menuDirector->save($menuAdmin);
        $this->addReference('menu-admin', $menuAdmin);

        /**
         * Front menu.
         */
        $menuFront = $menuDirector
            ->create()
            ->setCode('menu-front')
            ->setEnabled(true)
            ->addSubnode($this->getReference('menu-node-him'))
            ->addSubnode($this->getReference('menu-node-her'));

        $menuDirector->save($menuFront);
        $this->addReference('menu-front', $menuFront);
    }
1076150
public function init(ModuleManagerInterface $manager)
    {
        if (!$manager instanceof ModuleManager) {
            $errMsg =sprintf('Module manager not implement %s', ModuleManager::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }

        /** @var ServiceLocatorInterface $sm */
        $sm = $manager->getEvent()->getParam('ServiceManager');

        if (!$sm instanceof ServiceLocatorInterface) {
            $errMsg = sprintf('Service locator not implement %s', ServiceLocatorInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }
        /** @var ServiceListenerInterface $serviceListener */
        $serviceListener = $sm->get('ServiceListener');
        if (!$serviceListener instanceof ServiceListenerInterface) {
            $errMsg = sprintf('ServiceListener not implement %s', ServiceListenerInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }

        $serviceListener->addServiceManager(
            ModuleOptionsPluginManagerInterface::class,
            ModuleOptionsPluginManager::CONFIG_KEY,
            ModuleOptionsProviderInterface::class,
            'getModuleOptionsConfig'
        );
    }
607438
public function init(ModuleManagerInterface $manager)
    {
        if (!$manager instanceof ModuleManager) {
            $errMsg = sprintf('Module manager not implement %s', ModuleManager::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }

        /** @var ServiceLocatorInterface $sm */
        $sm = $manager->getEvent()->getParam('ServiceManager');

        if (!$sm instanceof ServiceLocatorInterface) {
            $errMsg = sprintf('Service locator not implement %s', ServiceLocatorInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }
        /** @var ServiceListenerInterface $serviceListener */
        $serviceListener = $sm->get('ServiceListener');
        if (!$serviceListener instanceof ServiceListenerInterface) {
            $errMsg = sprintf('ServiceListener not implement %s', ServiceListenerInterface::class);
            throw new Exception\InvalidArgumentException($errMsg);
        }

        $serviceListener->addServiceManager(
            DoctrineObjectManager::class,
            DoctrineObjectManager::CONFIG_KEY,
            DoctrineObjectManagerProviderInterface::class,
            'getDoctrineObjectManagerConfig'
        );

        $serviceListener->addServiceManager(
            EntityManager::class,
            EntityManager::CONFIG_KEY,
            EntityManagerProviderInterface::class,
            'getEntityManagerConfig'
        );
    }
986378
private void addMenuItems(Menu mMenu, boolean subMenu) {
        int groupId = R.id.material_drawer_menu_default_group;
        for (int i = 0; i < mMenu.size(); i++) {
            MenuItem mMenuItem = mMenu.getItem(i);
            IDrawerItem iDrawerItem;
            if (!subMenu && mMenuItem.getGroupId() != groupId && mMenuItem.getGroupId() != 0) {
                groupId = mMenuItem.getGroupId();
                iDrawerItem = new DividerDrawerItem();
                getItemAdapter().add(iDrawerItem);
            }
            if (mMenuItem.hasSubMenu()) {
                iDrawerItem = new PrimaryDrawerItem()
                        .withName(mMenuItem.getTitle().toString())
                        .withIcon(mMenuItem.getIcon())
                        .withIdentifier(mMenuItem.getItemId())
                        .withEnabled(mMenuItem.isEnabled())
                        .withSelectable(false);
                getItemAdapter().add(iDrawerItem);
                addMenuItems(mMenuItem.getSubMenu(), true);
            } else if (mMenuItem.getGroupId() != 0 || subMenu) {
                iDrawerItem = new SecondaryDrawerItem()
                        .withName(mMenuItem.getTitle().toString())
                        .withIcon(mMenuItem.getIcon())
                        .withIdentifier(mMenuItem.getItemId())
                        .withEnabled(mMenuItem.isEnabled());
                getItemAdapter().add(iDrawerItem);
            } else {
                iDrawerItem = new PrimaryDrawerItem()
                        .withName(mMenuItem.getTitle().toString())
                        .withIcon(mMenuItem.getIcon())
                        .withIdentifier(mMenuItem.getItemId())
                        .withEnabled(mMenuItem.isEnabled());
                getItemAdapter().add(iDrawerItem);
            }
        }
    }