summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Entity/Query/QueryBase.php
diff options
context:
space:
mode:
authorAlex Pott2015-04-09 14:36:54 (GMT)
committerAlex Pott2015-04-09 14:36:54 (GMT)
commit593b2b6446646d35d9d2600e91e1c2343171de74 (patch)
tree06337d2911ec17c2ddca81c2fd7ed9232da82b1c /core/lib/Drupal/Core/Entity/Query/QueryBase.php
parent79be8cfc8779806f59ba1a42669b6ac5cc185d47 (diff)
Issue #2458543 by mbovan, Anushka-mp, jhedstrom: Entity query age(EntityStorageInterface::FIELD_LOAD_REVISION) only gets current revision ID
Diffstat (limited to 'core/lib/Drupal/Core/Entity/Query/QueryBase.php')
-rw-r--r--core/lib/Drupal/Core/Entity/Query/QueryBase.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
index 4465efd..6f3d6aa 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -8,7 +8,6 @@
namespace Drupal\Core\Entity\Query;
use Drupal\Core\Database\Query\PagerSelectExtender;
-use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
/**
@@ -110,12 +109,9 @@ abstract class QueryBase implements QueryInterface {
/**
* Flag indicating whether to query the current revision or all revisions.
*
- * Can be either EntityStorageInterface::FIELD_LOAD_CURRENT or
- * EntityStorageInterface::FIELD_LOAD_REVISION.
- *
- * @var string
+ * @var bool
*/
- protected $age = EntityStorageInterface::FIELD_LOAD_CURRENT;
+ protected $allRevisions = FALSE;
/**
* The query pager data.
@@ -257,10 +253,18 @@ abstract class QueryBase implements QueryInterface {
}
/**
- * Implements \Drupal\Core\Entity\Query\QueryInterface::age().
+ * {@inheritdoc}
+ */
+ public function currentRevision() {
+ $this->allRevisions = FALSE;
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
*/
- public function age($age = EntityStorageInterface::FIELD_LOAD_CURRENT) {
- $this->age = $age;
+ public function allRevisions() {
+ $this->allRevisions = TRUE;
return $this;
}