You are here

public function QueryBase::getMetaData in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::getMetaData()
  2. 9 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::getMetaData()

Retrieves a given piece of metadata.

Parameters

$key: The unique identifier for the piece of metadata to retrieve.

Return value

The previously attached metadata object, or NULL if one doesn't exist.

Overrides AlterableInterface::getMetaData

File

core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 387

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

public function getMetaData($key) {
  return $this->alterMetaData[$key] ?? NULL;
}