Go to the source code of this file.
 | 
|   | elgg_create_river_item (array $options=array()) | 
|   | Adds an item to the river.  More...
  | 
|   | 
|   | elgg_delete_river (array $options=array()) | 
|   | Delete river items.  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 ($page) | 
|   | 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...
  | 
|   | 
◆ _elgg_get_river_type_subtype_where_sql()
      
        
          | _elgg_get_river_type_subtype_where_sql  | 
          ( | 
            | 
          $table,  | 
        
        
           | 
           | 
            | 
          $types,  | 
        
        
           | 
           | 
            | 
          $subtypes,  | 
        
        
           | 
           | 
            | 
          $pairs  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Returns SQL where clause for type and subtype on river table. 
Definition at line 579 of file river.php.
 
 
◆ _elgg_prefetch_river_entities()
      
        
          | _elgg_prefetch_river_entities  | 
          ( | 
          array  | 
          $river_items | ) | 
           | 
        
      
 
Prefetch entities that will be displayed in the river. 
- Parameters
 - 
  
    | \ElggRiverItem[] | $river_items | @access private  | 
  
   
Definition at line 451 of file river.php.
 
 
◆ _elgg_river_disable()
      
        
          | _elgg_river_disable  | 
          ( | 
            | 
          $event,  | 
        
        
           | 
           | 
            | 
          $type,  | 
        
        
           | 
           | 
            | 
          $entity  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Disable river entries that reference a disabled entity as subject/object/target. 
- Parameters
 - 
  
    | string | $event | The event 'disable'  | 
    | string | $type | Type of entity being disabled 'all'  | 
    | mixed | $entity | The entity being disabled  | 
  
   
- Returns
 - boolean @access private 
 
Definition at line 777 of file river.php.
 
 
◆ _elgg_river_enable()
      
        
          | _elgg_river_enable  | 
          ( | 
            | 
          $event,  | 
        
        
           | 
           | 
            | 
          $type,  | 
        
        
           | 
           | 
            | 
          $entity  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Enable river entries that reference a re-enabled entity as subject/object/target. 
- Parameters
 - 
  
    | string | $event | The event 'enable'  | 
    | string | $type | Type of entity being enabled 'all'  | 
    | mixed | $entity | The entity being enabled  | 
  
   
- Returns
 - boolean @access private 
 
Definition at line 804 of file river.php.
 
 
◆ _elgg_river_get_action_where_sql()
      
        
          | _elgg_river_get_action_where_sql  | 
          ( | 
            | 
          $types | ) | 
           | 
        
      
 
Get the where clause based on river action type strings. 
- Parameters
 - 
  
    | array | $types | Array of action type strings | 
  
   
- Returns
 - string 
 
- Since
 - 1.8.0 @access private 
 
Definition at line 657 of file river.php.
 
 
◆ _elgg_river_get_view_where_sql()
      
        
          | _elgg_river_get_view_where_sql  | 
          ( | 
            | 
          $views | ) | 
           | 
        
      
 
Get the where clause based on river view strings. 
- Parameters
 - 
  
    | array | $views | Array of view strings | 
  
   
- Returns
 - string 
 
- Since
 - 1.8.0 @access private 
 
Definition at line 686 of file river.php.
 
 
◆ _elgg_river_init()
Initialize river library @access private. 
Definition at line 833 of file river.php.
 
 
◆ _elgg_river_page_handler()
      
        
          | _elgg_river_page_handler  | 
          ( | 
            | 
          $page | ) | 
           | 
        
      
 
Page handler for activity. 
- Parameters
 - 
  
  
 
- Returns
 - bool @access private 
 
Definition at line 735 of file river.php.
 
 
◆ _elgg_river_test()
      
        
          | _elgg_river_test  | 
          ( | 
            | 
          $hook,  | 
        
        
           | 
           | 
            | 
          $type,  | 
        
        
           | 
           | 
            | 
          $value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Register river unit tests @access private. 
Definition at line 762 of file river.php.
 
 
◆ _elgg_row_to_elgg_river_item()
      
        
          | _elgg_row_to_elgg_river_item  | 
          ( | 
            | 
          $row | ) | 
           | 
        
      
 
Convert a database row to a new \ElggRiverItem. 
- Parameters
 - 
  
    | \stdClass | $row | Database row from the river table | 
  
   
- Returns
 - \ElggRiverItem 
 
- Since
 - 1.8.0 @access private 
 
Definition at line 556 of file river.php.
 
 
◆ elgg_create_river_item()
      
        
          | 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)".
- Parameters
 - 
  
    | 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
- Returns
 - int|bool River ID or false on failure 
 
- Since
 - 1.9 
 
Definition at line 37 of file river.php.
 
 
◆ elgg_delete_river()
      
        
          | elgg_delete_river  | 
          ( | 
          array  | 
          $options = array() | ) | 
           | 
        
      
 
Delete river items. 
- Warning
 - not checking access (should we?)
 
- Parameters
 - 
  
    | 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 views => STR|ARR River view(s) | 
  
   
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
posted_time_lower => INT The lower bound on the time posted posted_time_upper => INT The upper bound on the time posted
- Returns
 - bool 
 
- Since
 - 1.8.0 
 
Definition at line 162 of file river.php.
 
 
◆ elgg_get_river()
      
        
          | elgg_get_river  | 
          ( | 
          array  | 
          $options = array() | ) | 
           | 
        
      
 
Get river items. 
- Note
 - If using types and subtypes in a query, they are joined with an AND.
 
- Parameters
 - 
  
    | 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)
- Returns
 - array|int 
 
- Since
 - 1.8.0 
 
Definition at line 286 of file river.php.
 
 
◆ elgg_list_river()
      
        
          | elgg_list_river  | 
          ( | 
          array  | 
          $options = array() | ) | 
           | 
        
      
 
List river items. 
- Parameters
 - 
  
    | 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 | 
  
   
- Returns
 - string 
 
- Since
 - 1.8.0 
 
Definition at line 512 of file river.php.
 
 
◆ update_river_access_by_object()
      
        
          | update_river_access_by_object  | 
          ( | 
            | 
          $object_guid,  | 
        
        
           | 
           | 
            | 
          $access_id  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets the access ID on river items for a particular object. 
- Parameters
 - 
  
    | int | $object_guid | The GUID of the entity  | 
    | int | $access_id | The access ID | 
  
   
- Returns
 - bool Depending on success 
 
Definition at line 714 of file river.php.
 
 
◆ function