7 use Elgg\Traits\TimeUsing;
 
   57         $row = $this->db->getDataRow($select);
 
   59         return $row ? new \ElggRiverItem($row) : 
null;
 
   75         if (!empty(
$item->view) && !$this->views->viewExists(
$item->view)) {
 
   79         if (empty(
$item->action_type)) {
 
   83         if (empty(
$item->subject_guid) || !$this->entityTable->exists(
$item->subject_guid)) {
 
   87         if (empty(
$item->object_guid) || !$this->entityTable->exists(
$item->object_guid)) {
 
   91         if (!empty(
$item->target_guid) && !$this->entityTable->exists(
$item->target_guid)) {
 
   95         if (!empty(
$item->annotation_id) && !$this->annotationsTable->get(
$item->annotation_id)) {
 
  101         if (!$this->events->triggerBefore(
'create', 
'river', 
$item)) {
 
  117         $id = $this->db->insertData($insert);
 
  123         $item->posted = $created;
 
  124         $item->last_action = $created;
 
  126         $this->events->triggerAfter(
'create', 
'river', 
$item);
 
  143         if (!$this->events->triggerBefore(
'delete', 
'river', 
$item)) {
 
  152         $this->events->triggerAfter(
'delete', 
'river', 
$item);
 
  166         if ($last_action === null) {
 
  167             $last_action = $this->getCurrentTime()->getTimestamp();
 
  174         $this->db->updateData($update);
 
  176         return (
int) $last_action;
 
getCurrentTime($modifier='')
Get the (cloned) time.
$id
Generic annotation delete action.
Interfaces with the database to perform CRUD operations on annotations.
static fromTable(string $table)
Returns a QueryBuilder for deleting data from a given table.
Entity table database service.
static intoTable(string $table)
Returns a QueryBuilder for inserting data in a given table.
River table database action.
__construct(protected Database $db, protected AnnotationsTable $annotationsTable, protected EntityTable $entityTable, protected EventsService $events, protected ViewsService $views)
Create the river table service.
create(\ElggRiverItem $item)
Save a river item to the database.
updateLastAction(\ElggRiverItem $item, ?int $last_action=null)
Update the last_action column in the river table for $item.
static fromTable(string $table, ?string $alias=null)
Returns a QueryBuilder for selecting data from a given table.
static table(string $table)
Returns a QueryBuilder for updating data in a given table.
const ELGG_VALUE_TIMESTAMP
foreach($recommendedExtensions as $extension) if(empty(ini_get('session.gc_probability'))||empty(ini_get('session.gc_divisor'))) $db
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.