public function AlterableInterface::addMetaData
public AlterableInterface::addMetaData($key, $object)
Adds additional metadata to the query.
Often, a query may need to provide additional contextual data to alter hooks. Alter hooks may then use that information to decide if and how to take action.
Parameters
$key: The unique identifier for this piece of metadata. Must be a string that follows the same rules as any other PHP identifier.
$object: The additional data to add to the query. May be any valid PHP variable.
Return value
\Drupal\Core\Database\Query\AlterableInterface The called object.
File
- core/lib/Drupal/Core/Database/Query/AlterableInterface.php, line 78
Class
- AlterableInterface
- Interface for a query that can be manipulated via an alter hook.
Namespace
Drupal\Core\Database\QueryCode
public function addMetaData($key, $object);
© 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/core!lib!Drupal!Core!Database!Query!AlterableInterface.php/function/AlterableInterface::addMetaData/8.1.x