Select::addMetaData

public Select::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.

Overrides AlterableInterface::addMetaData

File

core/lib/Drupal/Core/Database/Query/Select.php, line 173

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function addMetaData($key, $object) {
  $this->alterMetaData[$key] = $object;
  return $this;
}
doc_Drupal
2016-10-29 09:41:13
Comments
Leave a Comment

Please login to continue.