Get a mapped array of all guardable controller actions
excluding the provided guest actions.

@return array
178408
public function getActionMap()
    {
        $plugins = $this->getLoadedPluginPaths();

        $actionMap = [];
        foreach ($plugins as $plugin => $path) {
            $controllers = $this->getControllersForPlugin($plugin, $path);
            foreach ($controllers as $controller) {
                $actions = $this->introspectController($controller['path']);
                if (empty($actions)) {
                    continue;
                }
                foreach ($actions as $action) {
                    $path = "{$plugin}.{$controller['name']}.{$action}";
                    if (in_array($path, $this->_guestActions)) {
                        continue;
                    }
                    $actionMap[$path] = [
                        'plugin' => $plugin,
                        'controller' => $controller['name'],
                        'action' => $action
                    ];
                }
            }
        }

        $appControllers = $this->getControllersForApp();
        foreach ($appControllers as $controller) {
            $actions = $this->introspectController($controller['path']);

            if (empty($actions)) {
                continue;
            }
            foreach ($actions as $action) {
                if (strpos($controller['path'], ROOT . DS . 'src' . DS . 'Controller') === false) {
                    $path = "App.{$controller['name']}.{$action}";
                    if (in_array($path, $this->_guestActions)) {
                        continue;
                    }
                    $actionMap[$path] = [
                        'plugin' => 'App',
                        'controller' => $controller['name'],
                        'action' => $action
                    ];
                } else {
                    $namespaceParts = explode(DS, substr($controller['path'], strlen(ROOT . DS . 'src' . DS . 'Controller') + 1));
                    array_pop($namespaceParts);
                    $namespace = join('/', $namespaceParts);
                    if (!empty($namespace)) {
                        $path = "App.{$namespace}/{$controller['name']}.{$action}";
                    } else {
                        $path = "App.{$controller['name']}.{$action}";
                    }
                    if (in_array($path, $this->_guestActions)) {
                        continue;
                    }
                    $actionMap[$path] = [
                        'plugin' => 'App',
                        'controller' => !empty($namespace) ? $namespace . '/' . $controller['name'] : $controller['name'],
                        'action' => $action
                    ];
                }
            }
        }

        return $actionMap;
    }
770478
private function getPermissionActions()
    {
        $actions = [];

        /**
         * @var $route \Symfony\Component\Routing\Route
         */
        foreach ($this->get('router')->getRouteCollection()->all() as $name => $route) {
            if ($route->hasOption('require_admin_permission')) {
                list(, $action) = explode('.', $route->getOption('require_admin_permission'));
                $actions[$action] = [
                    'id'   => $action,
                    'name' => $action
                ];
            }
        }

        ksort($actions);

        return array_values($actions);
    }
635187
final public function getActions() {
        $return = array();
        foreach (get_class_methods($this) as $method) {
            if (substr($method, strlen($method) - 6) === 'Action')
                $return[] = substr($method, 0, strlen($method) - 6);
        }
        return $return;
    }
304778
public function isBlockedController()
    {
        return max(array_map(
            function ($name) {
                return Controller::curr() instanceof $name;
            },
            Config::inst()->get(PiwikExtension::class, 'excluded_controllers')
        ));
    }
432044
public function behaviors() {

		$behaviors = parent::behaviors();

		$behaviors[ 'rbac' ][ 'actions' ][ 'gallery' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'data' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'config' ] = [ 'permission' => $this->crudPermission ];
		$behaviors[ 'rbac' ][ 'actions' ][ 'settings' ] = [ 'permission' => $this->crudPermission ];

		$behaviors[ 'verbs' ][ 'actions' ][ 'gallery' ] = [ 'get' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'data' ] = [ 'get', 'post' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'config' ] = [ 'get', 'post' ];
		$behaviors[ 'verbs' ][ 'actions' ][ 'settings' ] = [ 'get', 'post' ];

		$behaviors[ 'activity' ] = [
			'class' => ActivityBehavior::class,
			'admin' => true,
			'create' => [ 'create' ],
			'update' => [ 'update' ],
			'delete' => [ 'delete' ]
		];

		return $behaviors;
	}
432308
public function excludeOnClone()
    {
        return [
            $this->model->getKeyName(),
            $this->model->getCreatedAtColumn(),
            $this->model->getUpdatedAtColumn(),
        ];
    }
202531
public static function getCapabilities(string $controllerName = null, array $actions = []): array
    {
        $result = [];

        if (empty($controllerName)) {
            return $result;
        }

        $skipControllers = Configure::read('RolesCapabilities.accessCheck.skipControllers');
        if (is_callable([$controllerName, 'getSkipControllers'])) {
            $skipControllers = array_merge($skipControllers, $controllerName::getSkipControllers());
        }

        if (in_array($controllerName, $skipControllers)) {
            return $result;
        }

        $actions = static::getActions($controllerName, $actions);

        if (empty($actions)) {
            return $result;
        }

        // get controller table instance
        $table = static::getControllerTableInstance($controllerName);

        $result = static::getCapabilitiesForAction($table, $controllerName, $actions);

        return $result;
    }
672757
public function toData()
    {
        if ($this->action === self::TYPE_READ) {
            return [
                'fields' => 'whitelisted_domains',
            ];
        }

        if ($this->action === self::TYPE_DELETE) {
            return [
                'fields' => [
                    'whitelisted_domains',
                ],
            ];
        }

        return [
            'whitelisted_domains' => $this->domains,
        ];
    }
717352
protected function getForbiddenActions()
    {
        $forbidden = $this->getAssignedActions()->filter(function (Action $action) {
            return $action->pivot->provision === 'fail';
        })->pluck('slug')->all();

        return $forbidden;
    }
4118
public function getActions($controller)
    {
        $actions = [];
        foreach (get_class_methods($controller) as $method) {
            if (preg_match('#^(.*)Action$#', $method, $match)) {
                $actions[] = $match[1];
            }
        }

        return $actions;
    }
1144774
public function getAllowedOperations()
    {
        return [
            self::OPERATION_REQUEST,
            self::OPERATION_CANCEL,
            self::OPERATION_APPROVE,
            self::OPERATION_REJECT,
            self::OPERATION_QUERY,
        ];
    }
318601
public function behaviors()
    {
        $behaviors = parent::behaviors();
        $behaviors['authenticator'] = [
            'class' => CompositeAuth::class,
            'authMethods' => $this->authMethods,
        ];
        $behaviors['corsFilter'] = [
            'class' => \yii\filters\Cors::class,
            'cors' => [
                // restrict access to
                'Origin' => ['*'],
                'Access-Control-Request-Method' => ['POST', 'PUT', 'GET'],
                // Allow only POST and PUT methods
                'Access-Control-Request-Headers' => ['*'],
                // Allow only headers 'X-Wsse'
                'Access-Control-Allow-Credentials' => true,
                // Allow OPTIONS caching
                'Access-Control-Max-Age' => 3600,
                // Allow the X-Pagination-Current-Page header to be exposed to the browser.
                'Access-Control-Expose-Headers' => ['X-Pagination-Current-Page'],
            ],
        ];
        return $behaviors;
    }
290909
public function getAllAvailableRoles ()
    {
        return array_filter(
            $this->roleCollection,
            function (BaseRole $role)
            {
                if ($role instanceof Role)
                {
                    return !$role->isHidden();
                }

                //remove all BaseRoles
                return false;
            }
        );
    }
7264
public function dependableActions()
    {
        $actions = config('dependable_actions.' . get_called_class(), []);
        $return  = [];
        foreach ($actions as $action) {
            if (!$action instanceof Closure) {
                continue;
            }
            $return[] = call_user_func($action, $this);
        }

        return $return;
    }
176789
public function behaviors() {

        return [
            'rbac' => [
                'class' => Yii::$app->cmgCore->getRbacFilterClass(),
                'actions' => [
	                'index' => [ 'permission' => CoreGlobal::PERM_USER ],
	                'update' => [ 'permission' => CoreGlobal::PERM_USER ]
                ]
            ],
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'index' => [ 'get' ],
                    'update' => [ 'get', 'post' ]
                ]
            ]
        ];
    }
915152
public function getAssignedActions()
    {
        $assigned = $this->roles->map(
            function (Role $role) {
                return $role->actions;
            }
        )->flatten(1)->merge($this->actions()->get());

        return $assigned;
    }
4938
protected function getDisabledCommands() {
    $disabled_commands_config = $this->getConfigValue('disable-targets');
    if ($disabled_commands_config) {
      $disabled_commands = ArrayManipulator::flattenMultidimensionalArray($disabled_commands_config, ':');
      return $disabled_commands;
    }
    return [];
  }