|
Elgg
Version 2.3
|
Go to the source code of this file.
Namespaces | |
| Elgg\Core | |
| Activate a plugin or plugins. | |
Functions | |
| elgg_create_river_item (array $options=array()) | |
| Adds an item to the river. More... | |
| elgg_get_river (array $options=array()) | |
| Get river items. More... | |
| _elgg_prefetch_river_entities (array $river_items) | |
| Prefetch entities that will be displayed in the river. More... | |
| elgg_list_river (array $options=array()) | |
| List river items. More... | |
| _elgg_row_to_elgg_river_item ($row) | |
| Convert a database row to a new \ElggRiverItem. More... | |
| _elgg_get_river_type_subtype_where_sql ($table, $types, $subtypes, $pairs) | |
| Returns SQL where clause for type and subtype on river table. More... | |
| _elgg_river_get_action_where_sql ($types) | |
| Get the where clause based on river action type strings. More... | |
| _elgg_river_get_view_where_sql ($views) | |
| Get the where clause based on river view strings. More... | |
| update_river_access_by_object ($object_guid, $access_id) | |
| Sets the access ID on river items for a particular object. More... | |
| _elgg_river_page_handler ($segments) | |
| Page handler for activity. More... | |
| _elgg_river_test ($hook, $type, $value) | |
| Register river unit tests @access private. More... | |
| _elgg_river_disable ($event, $type, $entity) | |
| Disable river entries that reference a disabled entity as subject/object/target. More... | |
| _elgg_river_enable ($event, $type, $entity) | |
| Enable river entries that reference a re-enabled entity as subject/object/target. More... | |
| _elgg_river_init () | |
| Initialize river library @access private. More... | |
Variables | |
| return | function (\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) |
| _elgg_get_river_type_subtype_where_sql | ( | $table, | |
| $types, | |||
| $subtypes, | |||
| $pairs | |||
| ) |
| _elgg_prefetch_river_entities | ( | array | $river_items | ) |
| _elgg_river_disable | ( | $event, | |
| $type, | |||
| $entity | |||
| ) |
| _elgg_river_enable | ( | $event, | |
| $type, | |||
| $entity | |||
| ) |
| _elgg_river_get_action_where_sql | ( | $types | ) |
| _elgg_river_get_view_where_sql | ( | $views | ) |
| _elgg_river_init | ( | ) |
| _elgg_river_page_handler | ( | $segments | ) |
| _elgg_river_test | ( | $hook, | |
| $type, | |||
| $value | |||
| ) |
| _elgg_row_to_elgg_river_item | ( | $row | ) |
| elgg_create_river_item | ( | array | $options = array() | ) |
Adds an item to the river.
@tip Read the item like "Lisa (subject) posted (action) a comment (object) on John's blog (target)".
| array | $options | Array in format: view => STR The view that will handle the river item (must exist) action_type => STR An arbitrary string to define the action (eg 'comment', 'create')subject_guid => INT The GUID of the entity doing the action |
object_guid => INT The GUID of the entity being acted upon
target_guid => INT The GUID of the the object entity's container
access_id => INT The access ID of the river item (default: same as the object)
posted => INT The UNIX epoch timestamp of the river item (default: now)
annotation_id INT The annotation ID associated with this river entry
return_item => BOOL set to true to return the ElggRiverItem created
| elgg_get_river | ( | array | $options = array() | ) |
Get river items.
| array | $options | Parameters: 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) annotation_ids => INT|ARR The identifier of the annotation(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 |
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
relationship => STR Relationship identifier relationship_guid => INT|ARR Entity guid(s) inverse_relationship => BOOL Subject or object of the relationship (false)
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 Elgg\BatchResult 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)
| elgg_list_river | ( | array | $options = array() | ) |
List river items.
| array | $options | Any options from elgg_get_river() plus: item_view => STR Alternative view to render list items pagination => BOOL Display pagination links (true) no_results => STR|Closure Message to display if no items |
| update_river_access_by_object | ( | $object_guid, | |
| $access_id | |||
| ) |
| return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) | ( | \Elgg\EventsService | $events, |
| \Elgg\HooksRegistrationService | $hooks | ||
| ) |