Elgg  Version 6.1
Public Member Functions | Public Attributes | List of all members
Elgg\Database\RiverTable Class Reference

River table database action. More...

Public Member Functions

 __construct (protected Database $db, protected AnnotationsTable $annotationsTable, protected EntityTable $entityTable, protected EventsService $events, protected ViewsService $views)
 Create the river table service. More...
 
 get (int $id)
 Get a river item based on its ID. More...
 
 create (\ElggRiverItem $item)
 Save a river item to the database. More...
 
 delete (\ElggRiverItem $item)
 Delete a river item. More...
 
 updateLastAction (\ElggRiverItem $item, int $last_action=null)
 Update the last_action column in the river table for $item. More...
 

Public Attributes

const TABLE_NAME = 'river'
 
const DEFAULT_JOIN_ALIAS = 'rv'
 

Detailed Description

River table database action.

Since
4.0

Definition at line 16 of file RiverTable.php.

Constructor & Destructor Documentation

Elgg\Database\RiverTable::__construct ( protected Database  $db,
protected AnnotationsTable  $annotationsTable,
protected EntityTable  $entityTable,
protected EventsService  $events,
protected ViewsService  $views 
)

Create the river table service.

Parameters
Database$dbdatabase service
AnnotationsTable$annotationsTableannotations service
EntityTable$entityTableentity table service
EventsService$eventsevents service
ViewsService$viewsviews service

Definition at line 36 of file RiverTable.php.

Member Function Documentation

Elgg\Database\RiverTable::create ( \ElggRiverItem  $item)

Save a river item to the database.

Parameters
\ElggRiverItem$itemitem to save
Returns
bool

Definition at line 69 of file RiverTable.php.

Elgg\Database\RiverTable::delete ( \ElggRiverItem  $item)

Delete a river item.

Parameters
\ElggRiverItem$itemthe item to delete
Returns
bool

Definition at line 138 of file RiverTable.php.

Elgg\Database\RiverTable::get ( int  $id)

Get a river item based on its ID.

Parameters
int$idthe ID of the river item
Returns
|null

Definition at line 52 of file RiverTable.php.

Elgg\Database\RiverTable::updateLastAction ( \ElggRiverItem  $item,
int  $last_action = null 
)

Update the last_action column in the river table for $item.

Parameters
\ElggRiverItem$itemRiver item to update
int$last_actionTimestamp of last action
Returns
int

Definition at line 165 of file RiverTable.php.

Member Data Documentation

const Elgg\Database\RiverTable::DEFAULT_JOIN_ALIAS = 'rv'

Definition at line 25 of file RiverTable.php.

const Elgg\Database\RiverTable::TABLE_NAME = 'river'

Definition at line 23 of file RiverTable.php.


The documentation for this class was generated from the following file: