/**
* {@inheritdoc}
*/
public function preExecute(SelectInterface
$query = NULL
) { // If no query object is passed in, use $this.
if (!
isset($query)) { $query =
$this;
} // Only execute this once.
if ($query->
isPrepared()) { return TRUE;
} // Modules may alter all queries or only those having a particular tag.
if (isset($this->alterTags
)) { // Many contrib modules as well as Entity Reference in core assume that
// query tags used for access-checking purposes follow the pattern
// $entity_type . '_access'. But this is not the case for taxonomy terms,
// since the core Taxonomy module used to add term_access instead of
// taxonomy_term_access to its queries. Provide backwards compatibility
// by adding both tags here instead of attempting to fix all contrib