Networking\InitCmsBundle\Controller\MenuItemAdminController::createAction PHP Method

createAction() public method

public createAction ( )
    public function createAction()
    {
        /** @var Request $request */
        $request = $this->get('request_stack')->getCurrentRequest();
        if ($request->get('subclass') && $request->get('subclass') == 'menu') {
            if (false === $this->admin->isGranted('ROLE_SUPER_ADMIN')) {
                throw new AccessDeniedException();
            }
        }
        if ($request->get('subclass') == 'menu item') {
            $this->isNewMenuItem = true;
            if ($request->get('root_id')) {
                $this->get('session')->set('root_menu_id', $request->get('root_id'));
            }
        }
        return parent::createAction();
    }