Elgg
Version master
|
Go to the source code of this file.
Functions | |
elgg_create_river_item (array $options=[]) | |
Elgg river. More... | |
elgg_get_river (array $options=[]) | |
Get river items. More... | |
elgg_get_river_item_from_id (int $id) | |
Get river item from its ID. More... | |
elgg_delete_river (array $options=[]) | |
Delete river items based on $options. More... | |
elgg_list_river (array $options=[]) | |
List river items. More... | |
elgg_create_river_item | ( | array | $options = [] | ) |
Elgg river.
Activity stream functions. Adds an item to the river.
Read the item like "Lisa (subject) posted (action) a comment (object) on John's blog (target)".
array | $options | Array in format: |
string $view The view that will handle the river item string $action_type An arbitrary string to define the action (eg 'comment', 'create') int $subject_guid The GUID of the entity doing the action (default: current logged in user guid) int $object_guid The GUID of the entity being acted upon int $target_guid The GUID of the the object entity's container int $posted The UNIX epoch timestamp of the river item (default: now) int $annotation_id The annotation ID associated with this river entry
elgg_delete_river | ( | array | $options = [] | ) |
Delete river items based on $options.
Access is ignored during the execution of this function. Intended usage of this function is to cleanup river content. For an example see actions/avatar/upload.
array | $options | An options array. elgg_get_river() |
elgg_get_river | ( | array | $options = [] | ) |
Get river items.
Supports passing the following options ids => INT|ARR River item id(s) subject_guids => INT|ARR Subject guid(s) object_guids => INT|ARR Object guid(s) target_guids => INT|ARR Target guid(s) action_types => STR|ARR The river action type(s) identifier posted_time_lower => INT The lower bound on the time posted posted_time_upper => INT The upper bound on the time posted
annotation_ids => INT|ARR The identifier of the annotation(s)
Additionally accepts all "annotation_*" options supported by elgg_get_entities() but not annotation_ids as that applies to the river table
types => STR|ARR Entity type string(s) subtypes => STR|ARR Entity subtype string(s) type_subtype_pairs => ARR Array of type => subtype pairs where subtype can be an array of subtype strings
NOTE: If using types and subtypes in a query, they are joined with an AND.
Additionally accepts all "relationship_*" options supported by elgg_get_entities() relationship => STR Relationship identifier relationship_guid => INT|ARR Entity guid(s) inverse_relationship => BOOL Subject or object of the relationship (false) relationship_join_on => STR subject_guid|object_guid|target_guid (defaults to subject_guid)
limit => INT Number to show per page (20) offset => INT Offset in list (0) count => BOOL Count the river items? (false) order_by => STR Order by clause (rv.posted desc) group_by => STR Group by clause
distinct => BOOL If set to false, Elgg will drop the DISTINCT clause from the MySQL query, which will improve performance in some situations. Avoid setting this option without a full understanding of the underlying SQL query Elgg creates. (true)
batch => BOOL If set to true, an object will be returned instead of an array. (false) Since 2.3.
batch_inc_offset => BOOL If "batch" is used, this tells the batch to increment the offset on each fetch. This must be set to false if you delete the batched results. (true)
batch_size => INT If "batch" is used, this is the number of entities/rows to pull in before requesting more. (25)
array | $options | parameters |
elgg_get_river_item_from_id | ( | int | $id | ) |
elgg_list_river | ( | array | $options = [] | ) |
List river items.
array | $options | Any options from elgg_get_river() plus:
|