Свойство | Тип | Описание | |
---|---|---|---|
$access_cache | |||
$config | |||
$db | |||
$entities | |||
$hooks | |||
$session | ElggSessio\ElggSession | ||
$translator |
Метод | Описание | |
---|---|---|
__construct ( |
Constructor | |
addUser ( integer $user_guid, integer $collection_id ) : boolean | Adds a user to an access collection. | |
canEdit ( integer $collection_id, mixed $user_guid = null ) : boolean | Can the user change this access collection? | |
create ( string $name, integer $owner_guid ) : integer | false | Creates a new access collection. | |
delete ( integer $collection_id ) : boolean | Deletes a specified access collection and its membership. | |
get ( integer $collection_id ) : object | false | Get a specified access collection | |
getAccessArray ( integer $user_guid, boolean $flush = false ) : array | Returns an array of access IDs a user is permitted to see. | |
getAccessList ( integer $user_guid, boolean $flush = false ) : string | Return a string of access_ids for $user_guid appropriate for inserting into an SQL IN clause. | |
getCollectionsByMember ( integer $member_guid ) : array | false | Return an array of database row objects of the access collections $entity_guid is a member of. | |
getEntityCollections ( integer $owner_guid ) : array | false | Returns an array of database row objects of the access collections owned by $owner_guid. | |
getMembers ( integer $collection_id, boolean $guids_only = false ) : ElggUse\ElggUser[] | int[] | false | Get all of members of an access collection | |
getReadableAccessLevel ( integer $entity_access_id ) : string | Return the name of an ACCESS_* constant or an access collection, but only if the logged in user owns the access collection or is an admin. | |
getWhereSql ( array $options = [] ) : string | Returns the SQL where clause for enforcing read access to data. | |
getWriteAccessArray ( integer $user_guid, boolean $flush = false, array $input_params = [] ) : array | Returns an array of access permissions that the user is allowed to save content with. | |
hasAccessToEntity ( ElggEntit\ElggEntity $entity, ElggUse\ElggUser $user = null ) : boolean | Can a user access an entity. | |
removeUser ( integer $user_guid, integer $collection_id ) : boolean | Removes a user from an access collection. | |
update ( integer $collection_id, array $members ) : boolean | Updates the membership in an access collection. |
public __construct ( |
||
$config | Config | |
$db | Database | |
$entities | Entity table | |
$cache | ElggStaticVariableCach\ElggStaticVariableCache | Access cache |
$hooks | Hooks | |
$session | ElggSessio\ElggSession | Session |
$translator | Translator |
public getAccessArray ( integer $user_guid, boolean $flush = false ) : array | ||
$user_guid | integer | User ID; defaults to currently logged in user |
$flush | boolean | If set to true, will refresh the access ids from the database rather than using this function's cache. |
Результат | array | An array of access collections ids |
public getAccessList ( integer $user_guid, boolean $flush = false ) : string | ||
$user_guid | integer | User ID; defaults to currently logged in user |
$flush | boolean | If set to true, will refresh the access list from the database rather than using this function's cache. |
Результат | string | A list of access collections suitable for using in an SQL call |
public getCollectionsByMember ( integer $member_guid ) : array | false | ||
$member_guid | integer | The entity guid |
Результат | array | false |
public getEntityCollections ( integer $owner_guid ) : array | false | ||
$owner_guid | integer | The entity guid |
Результат | array | false |
public getMembers ( integer $collection_id, boolean $guids_only = false ) : ElggUse\ElggUser[] | int[] | false | ||
$collection_id | integer | The collection's ID |
$guids_only | boolean | If set to true, will only return the members' GUIDs (default: false) |
Результат | ElggUse\ElggUser[] | int[] | false | guids or entities if successful, false if not |
public getReadableAccessLevel ( integer $entity_access_id ) : string | ||
$entity_access_id | integer | The entity's access id |
Результат | string |
public getWhereSql ( array $options = [] ) : string | ||
$options | array | Array in format: table_alias => STR Optional table alias. This is based on the select and join clauses. Default is 'e'. user_guid => INT Optional GUID for the user that we are retrieving data for. Defaults to the logged in user if null. Passing 0 will build a query for a logged out user (even if there is a logged in user) use_enabled_clause => BOOL Optional. Should we append the enabled clause? The default is set by access_show_hidden_entities(). access_column => STR Optional access column name. Default is 'access_id'. owner_guid_column => STR Optional owner_guid column. Default is 'owner_guid'. guid_column => STR Optional guid_column. Default is 'guid'. |
Результат | string |
public getWriteAccessArray ( integer $user_guid, boolean $flush = false, array $input_params = [] ) : array | ||
$user_guid | integer | The user's GUID. |
$flush | boolean | If this is set to true, this will ignore a cached access array |
$input_params | array | Some parameters passed into an input/access view |
Результат | array | List of access permissions |
public hasAccessToEntity ( ElggEntit\ElggEntity $entity, ElggUse\ElggUser $user = null ) : boolean | ||
$entity | ElggEntit\ElggEntity | The entity to check access for. |
$user | ElggUse\ElggUser | Optionally user to check access for. Defaults to logged in user (which is a useless default). |
Результат | boolean |
protected PluginHooksService,Elgg $hooks | ||
Результат |
protected ElggSession,ElggSessio $session | ||
Результат | ElggSessio\ElggSession |