src/Controller.php
private function adminModules()
    {
        $return = [];

        foreach ($this->app[ 'config' ]->get('modules.all') as $module) {
            $controller = '\\app\\'.$module.'\\Controller';

            if (!class_exists($controller)) {
                continue;
            }

            if (property_exists($controller, 'scaffoldAdmin') ||
                property_exists($controller, 'hasAdminView')) {
                $moduleInfo = [
                    'name' => $module,
                    'title' => Inflector::get()->titleize($module), ];

                if (property_exists($controller, 'properties')) {
                    $moduleInfo = array_replace($moduleInfo, $controller::$properties);
                }

                $return[] = $moduleInfo;
            }
        }

        return $return;
    }
private function adminModules()
    {
        $return = [];

        foreach ($this->app[ 'config' ]->get('modules.all') as $module) {
            $controller = '\\app\\'.$module.'\\Controller';

            if (!class_exists($controller)) {
                continue;
            }

            if (property_exists($controller, 'scaffoldAdmin') ||
                property_exists($controller, 'hasAdminView')) {
                $moduleInfo = [
                    'name' => $module,
                    'title' => Inflector::get()->titleize($module), ];

                if (property_exists($controller, 'properties')) {
                    $moduleInfo = array_replace($moduleInfo, $controller::$properties);
                }

                $return[] = $moduleInfo;
            }
        }

        return $return;
    }
private function adminModules ( ) { $ return = [ ] ; foreach ( $ this -> app [ 'config' ] -> get ( 'modules.all' ) as $ module ) { $ controller = '\\app\\' . $ module . '\\Controller' ; if ( ! class_exists ( $ controller ) ) { continue ; } if ( property_exists ( $ controller , 'scaffoldAdmin' ) || property_exists ( $ controller , 'hasAdminView' ) ) { $ moduleInfo = [ 'name' => $ module , 'title' => Inflector :: get ( ) -> titleize ( $ module ) , ] ; if ( property_exists ( $ controller , 'properties' ) ) { $ moduleInfo = array_replace ( $ moduleInfo , $ controller :: $ properties ) ; } $ return [ ] = $ moduleInfo ; } } return $ return ; }
Returns a list of modules with admin sections.

@param array $modules input modules

@return array admin-enabled modules
Returns a list of modules with admin sections .