concrete/src/Permission/Key/Key.php
public static function loadAll()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $permissionkeys = [];
        $txt = $app->make('helper/text');
        $e = $db->executeQuery(<<<'EOT'
select pkID, pkName, pkDescription, pkHandle, pkCategoryHandle, pkCanTriggerWorkflow, pkHasCustomClass, PermissionKeys.pkCategoryID, PermissionKeyCategories.pkgID
from PermissionKeys
inner join PermissionKeyCategories on PermissionKeyCategories.pkCategoryID = PermissionKeys.pkCategoryID
EOT
        );
        while (($r = $e->fetch(PDO::FETCH_ASSOC)) !== false) {
            if ($r['pkHasCustomClass']) {
                $class = '\\Core\\Permission\\Key\\' . $txt->camelcase($r['pkHandle'] . '_' . $r['pkCategoryHandle']) . 'Key';
            } else {
                $class = '\\Core\\Permission\\Key\\' . $txt->camelcase($r['pkCategoryHandle']) . 'Key';
            }
            $pkgHandle = $r['pkgID'] ? PackageList::getHandle($r['pkgID']) : null;
            $class = core_class($class, $pkgHandle);
            $pk = $app->make($class);
            $pk->setPropertiesFromArray($r);
            $permissionkeys[$r['pkHandle']] = $pk;
            $permissionkeys[$r['pkID']] = $pk;
        }

        $cache = $app->make('cache/request');
        if ($cache->isEnabled()) {
            $cache->getItem('permission_keys')->set($permissionkeys)->save();
        }

        return $permissionkeys;
    }
public static function loadAll()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $permissionkeys = [];
        $txt = $app->make('helper/text');
        $e = $db->executeQuery(<<<'EOT'
select pkID, pkName, pkDescription, pkHandle, pkCategoryHandle, pkCanTriggerWorkflow, pkHasCustomClass, PermissionKeys.pkCategoryID, PermissionKeyCategories.pkgID
from PermissionKeys
inner join PermissionKeyCategories on PermissionKeyCategories.pkCategoryID = PermissionKeys.pkCategoryID
EOT
        );
        while (($r = $e->fetch(PDO::FETCH_ASSOC)) !== false) {
            if ($r['pkHasCustomClass']) {
                $class = '\\Core\\Permission\\Key\\' . $txt->camelcase($r['pkHandle'] . '_' . $r['pkCategoryHandle']) . 'Key';
            } else {
                $class = '\\Core\\Permission\\Key\\' . $txt->camelcase($r['pkCategoryHandle']) . 'Key';
            }
            $pkgHandle = $r['pkgID'] ? PackageList::getHandle($r['pkgID']) : null;
            $class = core_class($class, $pkgHandle);
            $pk = $app->make($class);
            $pk->setPropertiesFromArray($r);
            $permissionkeys[$r['pkHandle']] = $pk;
            $permissionkeys[$r['pkID']] = $pk;
        }

        $cache = $app->make('cache/request');
        if ($cache->isEnabled()) {
            $cache->getItem('permission_keys')->set($permissionkeys)->save();
        }

        return $permissionkeys;
    }
public static function loadAll ( ) { $ app = Application :: getFacadeApplication ( ) ; $ db = $ app -> make ( Connection :: class ) ; $ permissionkeys = [ ] ; $ txt = $ app -> make ( 'helper/text' ) ; $ e = $ db -> executeQuery ( <<<'EOT'
select pkID, pkName, pkDescription, pkHandle, pkCategoryHandle, pkCanTriggerWorkflow, pkHasCustomClass, PermissionKeys.pkCategoryID, PermissionKeyCategories.pkgID
from PermissionKeys
inner join PermissionKeyCategories on PermissionKeyCategories.pkCategoryID = PermissionKeys.pkCategoryID
EOT ) ; while ( ( $ r = $ e -> fetch ( PDO :: FETCH_ASSOC ) ) !== false ) { if ( $ r [ 'pkHasCustomClass' ] ) { $ class = '\\Core\\Permission\\Key\\' . $ txt -> camelcase ( $ r [ 'pkHandle' ] . '_' . $ r [ 'pkCategoryHandle' ] ) . 'Key' ; } else { $ class = '\\Core\\Permission\\Key\\' . $ txt -> camelcase ( $ r [ 'pkCategoryHandle' ] ) . 'Key' ; } $ pkgHandle = $ r [ 'pkgID' ] ? PackageList :: getHandle ( $ r [ 'pkgID' ] ) : null ; $ class = core_class ( $ class , $ pkgHandle ) ; $ pk = $ app -> make ( $ class ) ; $ pk -> setPropertiesFromArray ( $ r ) ; $ permissionkeys [ $ r [ 'pkHandle' ] ] = $ pk ; $ permissionkeys [ $ r [ 'pkID' ] ] = $ pk ; } $ cache = $ app -> make ( 'cache/request' ) ; if ( $ cache -> isEnabled ( ) ) { $ cache -> getItem ( 'permission_keys' ) -> set ( $ permissionkeys ) -> save ( ) ; } return $ permissionkeys ; }
Get the list of all the defined permission keys.

@return \Concrete\Core\Permission\Key\Key[]
Get the list of all the defined permission keys .