*/
protected $allRevisions = FALSE;
+ /**
+ * Flag indicating whether to query the latest revision.
+ *
+ * @var bool
+ */
+ protected $latestRevision = FALSE;
+
/**
* The query pager data.
*
*/
public function currentRevision() {
$this->allRevisions = FALSE;
+ $this->latestRevision = FALSE;
+ return $this;
+ }
+
+ /**
+ * Queries the latest revision.
+ *
+ * The latest revision is the most recent revision of an entity. This will be
+ * either the default revision, or a pending revision if one exists and it is
+ * newer than the default.
+ *
+ * @return $this
+ */
+ public function latestRevision() {
+ $this->allRevisions = TRUE;
+ $this->latestRevision = TRUE;
return $this;
}
*/
public function allRevisions() {
$this->allRevisions = TRUE;
+ $this->latestRevision = FALSE;
return $this;
}
* {@inheritdoc}
*/
public function hasAllTags() {
- return !(boolean)array_diff(func_get_args(), array_keys($this->alterTags));
+ return !(boolean) array_diff(func_get_args(), array_keys($this->alterTags));
}
/**
* {@inheritdoc}
*/
public function hasAnyTag() {
- return (boolean)array_intersect(func_get_args(), array_keys($this->alterTags));
+ return (boolean) array_intersect(func_get_args(), array_keys($this->alterTags));
}
/**