QueryBase::__clone

QueryBase::__clone() Makes sure that the Condition object is cloned as well. File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 328 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code function __clone() { $this->condition = clone $this->condition; }

QueryBase::tableSort

public QueryBase::tableSort(&$headers) Enables sortable tables for this query. Parameters $headers: An array of headers of the same structure as described in template_preprocess_table(). Use a 'specifier' in place of a 'field' to specify what to sort on. This can be an entity or a field as described in condition(). Return value \Drupal\Core\Entity\Query\QueryInterface The called object. Overrides QueryInterface::tableSort File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 306 C

QueryBase::sortAggregate

public QueryBase::sortAggregate($field, $function, $direction = 'ASC', $langcode = NULL) File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 407 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code public function sortAggregate($field, $function, $direction = 'ASC', $langcode = NULL) { $alias = $this->getAggregationAlias($field, $function); $this->sortAggregate[$alias] = array( 'field' => $field, 'function' => $function,

QueryBase::sort

public QueryBase::sort($field, $direction = 'ASC', $langcode = NULL) Parameters $field: Name of a field. string $direction: $langcode: Language code (optional). Return value \Drupal\Core\Entity\Query\QueryInterface The called object. Overrides QueryInterface::sort File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 225 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code public function sort($field, $direction = 'ASC', $langcode = NULL) { $thi

QueryBase::range

public QueryBase::range($start = NULL, $length = NULL) Parameters null $start: null $length: Return value \Drupal\Core\Entity\Query\QueryInterface The called object. Overrides QueryInterface::range File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 183 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code public function range($start = NULL, $length = NULL) { $this->range = array( 'start' => $start, 'length' => $length, );

QueryBase::pager

public QueryBase::pager($limit = 10, $element = NULL) Enables a pager for the query. Parameters $limit: An integer specifying the number of elements per page. If passed a false value (FALSE, 0, NULL), the pager is disabled. $element: An optional integer to distinguish between multiple pagers on one page. If not provided, one is automatically calculated. Return value \Drupal\Core\Entity\Query\QueryInterface The called object. Overrides QueryInterface::pager File core/lib/Drupal/Core/Entity/Que

QueryBase::orConditionGroup

public QueryBase::orConditionGroup() Creates a new group of conditions ORed together. For example, consider a map entity with an 'attributes' field containing 'building_type' and 'color' columns. To find all green and red bikesheds: $query = \Drupal::entityQuery('map'); $group = $query->orConditionGroup() ->condition('attributes.color', 'red') ->condition('attributes.color', 'green'); $entity_ids = $query ->condition('attributes.building_type', 'bikeshed') ->

QueryBase::notExists

public QueryBase::notExists($property, $langcode = NULL) Queries for an empty field. Parameters $field.: Name of a field. $langcode: Language code (optional). Return value \Drupal\Core\Entity\Query\QueryInterface Overrides QueryInterface::notExists File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 175 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code public function notExists($property, $langcode = NULL) { $this->condition->notExist

QueryBase::initializePager

protected QueryBase::initializePager() Gets the total number of results and initialize a pager for the query. The pager can be disabled by either setting the pager limit to 0, or by setting this query to be a count query. File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 292 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code protected function initializePager() { if ($this->pager && !empty($this->pager['limit']) && !$th

QueryBase::hasTag

public QueryBase::hasTag($tag) Determines if a given query has a given tag. Parameters $tag: The tag to check. Return value TRUE if this query has been marked with this tag, FALSE otherwise. Overrides AlterableInterface::hasTag File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 343 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code public function hasTag($tag) { return isset($this->alterTags[$tag]); }