src/ACL/DBRuleLoader.php
public function loadRules(string $entity_id)
    {
        $records = ACLRule::get(["entity_id" => $entity_id]);
        $rules = array();
        foreach ($records as $record)
        {
            $rule = new Rule($record->entity_id, $record->role_id, $record->action, $record->policy);
            $rule->setRecord($record);
            $rules[] = $rule;
        }

        return $rules;
    }
public function loadRules(string $entity_id)
    {
        $records = ACLRule::get(["entity_id" => $entity_id]);
        $rules = array();
        foreach ($records as $record)
        {
            $rule = new Rule($record->entity_id, $record->role_id, $record->action, $record->policy);
            $rule->setRecord($record);
            $rules[] = $rule;
        }

        return $rules;
    }
public function loadRules ( string $ entity_id ) { $ records = ACLRule :: get ( [ "entity_id" => $ entity_id ] ) ; $ rules = array ( ) ; foreach ( $ records as $ record ) { $ rule = new Rule ( $ record -> entity_id , $ record -> role_id , $ record -> action , $ record -> policy ) ; $ rule -> setRecord ( $ record ) ; $ rules [ ] = $ rule ; } return $ rules ; }
Loads the rules for the specified entity from the database.
Loads the rules for the specified entity from the database .