protected function prepareListReportRoute(array &$routes)
    {
        $permissions = $this->getPermissionsReportRole();

        foreach ($routes as $pattern => &$route) {

            if (strpos($pattern, 'admin') === 0 && !isset($route['access'])) {
                $route['access'] = 'admin';
            }

            if (!isset($route['access'])) {
                $route['access'] = GC_PERM_PUBLIC;
            }

            $access_names = array();

            if (isset($permissions[$route['access']])) {
                $access_names[$route['access']] = $this->text($permissions[$route['access']]);
            } else {
                $access_names[''] = $this->text($permissions[GC_PERM_PUBLIC]);
            }

            if ($route['access'] === GC_PERM_SUPERADMIN) {
                $access_names = array(GC_PERM_SUPERADMIN => $this->text($permissions[GC_PERM_SUPERADMIN]));
            }

            $route['pattern'] = $pattern;
            $route['access_name'] = implode(' + ', $access_names);
            $route['access'] = implode('', array_keys($access_names));
            $route['status'] = !isset($route['status']) || !empty($route['status']);
        }
    }
protected function prepareListReportRoute(array &$routes)
    {
        $permissions = $this->getPermissionsReportRole();

        foreach ($routes as $pattern => &$route) {

            if (strpos($pattern, 'admin') === 0 && !isset($route['access'])) {
                $route['access'] = 'admin';
            }

            if (!isset($route['access'])) {
                $route['access'] = GC_PERM_PUBLIC;
            }

            $access_names = array();

            if (isset($permissions[$route['access']])) {
                $access_names[$route['access']] = $this->text($permissions[$route['access']]);
            } else {
                $access_names[''] = $this->text($permissions[GC_PERM_PUBLIC]);
            }

            if ($route['access'] === GC_PERM_SUPERADMIN) {
                $access_names = array(GC_PERM_SUPERADMIN => $this->text($permissions[GC_PERM_SUPERADMIN]));
            }

            $route['pattern'] = $pattern;
            $route['access_name'] = implode(' + ', $access_names);
            $route['access'] = implode('', array_keys($access_names));
            $route['status'] = !isset($route['status']) || !empty($route['status']);
        }
    }
protected function prepareListReportRoute ( array & $ routes ) { $ permissions = $ this -> getPermissionsReportRole ( ) ; foreach ( $ routes as $ pattern => & $ route ) { if ( strpos ( $ pattern , 'admin' ) === 0 && ! isset ( $ route [ 'access' ] ) ) { $ route [ 'access' ] = 'admin' ; } if ( ! isset ( $ route [ 'access' ] ) ) { $ route [ 'access' ] = GC_PERM_PUBLIC ; } $ access_names = array ( ) ; if ( isset ( $ permissions [ $ route [ 'access' ] ] ) ) { $ access_names [ $ route [ 'access' ] ] = $ this -> text ( $ permissions [ $ route [ 'access' ] ] ) ; } else { $ access_names [ '' ] = $ this -> text ( $ permissions [ GC_PERM_PUBLIC ] ) ; } if ( $ route [ 'access' ] === GC_PERM_SUPERADMIN ) { $ access_names = array ( GC_PERM_SUPERADMIN => $ this -> text ( $ permissions [ GC_PERM_SUPERADMIN ] ) ) ; } $ route [ 'pattern' ] = $ pattern ; $ route [ 'access_name' ] = implode ( ' + ' , $ access_names ) ; $ route [ 'access' ] = implode ( '' , array_keys ( $ access_names ) ) ; $ route [ 'status' ] = ! isset ( $ route [ 'status' ] ) || ! empty ( $ route [ 'status' ] ) ; } }
Prepares an array of routes
@param array $routes
Prepares an array of routes