public function EntityFieldQuery::age

public EntityFieldQuery::age($age)

Queries the current or every revision.

Note that this only affects field conditions. Property conditions always apply to the current revision. @TODO: Once revision tables have been cleaned up, revisit this.

Parameters

$age:

  • FIELD_LOAD_CURRENT (default): Query the most recent revisions for all entities. The results will be keyed by entity type and entity ID.
  • FIELD_LOAD_REVISION: Query all revisions. The results will be keyed by entity type and entity revision ID.

Return value

EntityFieldQuery The called object.

File

includes/entity.inc, line 1125

Class

EntityFieldQuery
Retrieves entities matching a given set of conditions.

Code

public function age($age) {
  $this->age = $age;
  return $this;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!entity.inc/function/EntityFieldQuery::age/7.x