113 $alias =
function (
$column) use ($table_alias) {
114 return $table_alias ?
"{$table_alias}.{$column}" :
$column;
118 $wheres[] = parent::prepare(
$qb, $table_alias);
125 $wheres[] =
$access->prepare(
$qb, $table_alias);
129 $wheres[] =
$type->prepare(
$qb, $table_alias);
132 $wheres[] =
$qb->compare($alias(
'owner_guid'),
'=', $this->owner_guids,
ELGG_VALUE_GUID);
133 $wheres[] =
$qb->compare($alias(
'container_guid'),
'=', $this->container_guids,
ELGG_VALUE_GUID);
134 $wheres[] =
$qb->between($alias(
'time_created'), $this->created_after, $this->created_before,
ELGG_VALUE_TIMESTAMP);
135 $wheres[] =
$qb->between($alias(
'time_updated'), $this->updated_after, $this->updated_before,
ELGG_VALUE_TIMESTAMP);
136 $wheres[] =
$qb->between($alias(
'last_action'), $this->last_action_after, $this->last_action_before,
ELGG_VALUE_TIMESTAMP);
137 $wheres[] =
$qb->between($alias(
'time_deleted'), $this->deleted_after, $this->deleted_before,
ELGG_VALUE_TIMESTAMP);
140 $wheres[] =
$qb->compare($alias(
'access_id'),
'=', $this->access_ids,
ELGG_VALUE_ID);
142 return $qb->merge($wheres);
152 $where =
new static();
154 $where->owner_guids =
$options->owner_guids;
155 $where->container_guids =
$options->container_guids;
156 $where->type_subtype_pairs =
$options->type_subtype_pairs;
157 $where->created_after =
$options->created_after;
158 $where->created_before =
$options->created_before;
159 $where->updated_after =
$options->updated_after;
160 $where->updated_before =
$options->updated_before;
161 $where->last_action_after =
$options->last_action_after;
162 $where->last_action_before =
$options->last_action_before;
163 $where->deleted_after =
$options->deleted_after;
164 $where->deleted_before =
$options->deleted_before;
165 $where->access_ids =
$options->access_ids;
Builds queries to restrict access.
Builds queries for filtering entities by their properties in the entities table.
prepare(QueryBuilder $qb, $table_alias='')
{{Build an expression and/or apply it to an instance of query builder.Query builder Table aliasCompos...
static factory(QueryOptions $options)
Build new clause from options.
Builds clauses for filtering entities by their type and subtype.
Builds a clause from closure or composite expression.
Database abstraction query builder.
const ELGG_VALUE_TIMESTAMP
if($who_can_change_language==='nobody') elseif($who_can_change_language==='admin_only' &&!elgg_is_admin_logged_in()) $options