public static function filterSkippedActions(string $controllerName, array $actions): array
    {
        $skipActions = [];
        if (is_callable([$controllerName, 'getSkipActions'])) {
            $skipActions = $controllerName::getSkipActions($controllerName);
        }

        // skip actions for all controllers, if defined in the plugin's configuration.
        $allSkipActions = Configure::read('RolesCapabilities.accessCheck.skipActions.*');
        if (!empty($allSkipActions)) {
            $skipActions = array_merge($skipActions, $allSkipActions);
        }

        // skip actions for specified controller, if defined in the plugin's configuration.
        $controllerSkipActions = Configure::read('RolesCapabilities.accessCheck.skipActions.' . $controllerName);
        if (!empty($controllerSkipActions)) {
            $skipActions = array_merge($skipActions, $controllerSkipActions);
        }

        $skipActions = array_merge(
            $skipActions,
            static::getCakeControllerActions()
        );

        foreach ($actions as $k => $action) {
            if (in_array($action, $skipActions)) {
                unset($actions[$k]);
            }
        }

        return $actions;
    }
public static function filterSkippedActions(string $controllerName, array $actions): array
    {
        $skipActions = [];
        if (is_callable([$controllerName, 'getSkipActions'])) {
            $skipActions = $controllerName::getSkipActions($controllerName);
        }

        // skip actions for all controllers, if defined in the plugin's configuration.
        $allSkipActions = Configure::read('RolesCapabilities.accessCheck.skipActions.*');
        if (!empty($allSkipActions)) {
            $skipActions = array_merge($skipActions, $allSkipActions);
        }

        // skip actions for specified controller, if defined in the plugin's configuration.
        $controllerSkipActions = Configure::read('RolesCapabilities.accessCheck.skipActions.' . $controllerName);
        if (!empty($controllerSkipActions)) {
            $skipActions = array_merge($skipActions, $controllerSkipActions);
        }

        $skipActions = array_merge(
            $skipActions,
            static::getCakeControllerActions()
        );

        foreach ($actions as $k => $action) {
            if (in_array($action, $skipActions)) {
                unset($actions[$k]);
            }
        }

        return $actions;
    }
public static function filterSkippedActions ( string $ controllerName , array $ actions ) : array { $ skipActions = [ ] ; if ( is_callable ( [ $ controllerName , 'getSkipActions' ] ) ) { $ skipActions = $ controllerName :: getSkipActions ( $ controllerName ) ; } // skip actions for all controllers, if defined in the plugin's configuration. $ allSkipActions = Configure :: read ( 'RolesCapabilities.accessCheck.skipActions.*' ) ; if ( ! empty ( $ allSkipActions ) ) { $ skipActions = array_merge ( $ skipActions , $ allSkipActions ) ; } // skip actions for specified controller, if defined in the plugin's configuration. $ controllerSkipActions = Configure :: read ( 'RolesCapabilities.accessCheck.skipActions.' . $ controllerName ) ; if ( ! empty ( $ controllerSkipActions ) ) { $ skipActions = array_merge ( $ skipActions , $ controllerSkipActions ) ; } $ skipActions = array_merge ( $ skipActions , static :: getCakeControllerActions ( ) ) ; foreach ( $ actions as $ k => $ action ) { if ( in_array ( $ action , $ skipActions ) ) { unset ( $ actions [ $ k ] ) ; } } return $ actions ; }
Method that filter's out skipped actions from Controller's actions list.

@param  string $controllerName Controller name
@param  mixed[]  $actions        Controller actions
@return mixed[]
Method that filter s out skipped actions from Controller s actions list .