/** * for demonstration purposes, only one rule is created for a specific data object for a specific user * * @param $gid The GlobalID requesting entitiy * @param $uoid The UOID of the content or wildcard (*) * * @return array of AccessControlRuleObjects, NULL if no rules were found */ protected function loadAccessControlRulesForUOID($gid, $uoid) { $rules = array(); if ($gid == '28B6TE8T9NUO202C5NZIUTNQSP88E70B8JAWH4FQ58OJOB8LIF' && $uoid == '4802C8DE6UZZ5BICQI830A8P8BW3YB5EBPGXWNRH1EP7H838V7:a9ddbc2102bf86d1') { $rules[] = (new AccessControlRuleObjectBuilder())->owner(Sonic::getContextGlobalID())->index(1)->directive(AccessControlRuleObject::DIRECTIVE_ALLOW)->entityType(AccessControlRuleObject::ENTITY_TYPE_INDIVIDUAL)->entityID('28B6TE8T9NUO202C5NZIUTNQSP88E70B8JAWH4FQ58OJOB8LIF')->targetType(AccessControlRuleObject::TARGET_TYPE_CONTENT)->target('4802C8DE6UZZ5BICQI830A8P8BW3YB5EBPGXWNRH1EP7H838V7:a9ddbc2102bf86d1')->accessType(AccessControlRuleObject::WILDCARD)->build(); } return $rules; }