Airship\Cabin\Bridge\Blueprint\Permissions::getGroupRulesForContextSave PHP Méthode

getGroupRulesForContextSave() protected méthode

protected getGroupRulesForContextSave ( array $actions, integer $contextId ) : array
$actions array
$contextId integer
Résultat array
    protected function getGroupRulesForContextSave(array $actions, int $contextId) : array
    {
        $perms = [];
        $groupIds = $this->db->first('SELECT DISTINCT groupid FROM airship_perm_rules WHERE context = ? AND groupid IS NOT NULL', $contextId);
        foreach ($groupIds as $group) {
            $allowed = $this->getGroupPerms((int) $group, $contextId);
            foreach ($actions as $act) {
                $perms[$group][$act] = \in_array($act, $allowed);
            }
        }
        return $perms;
    }