function DataReferenceDefinition::setTargetDefinition
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php \Drupal\Core\TypedData\DataReferenceDefinition::setTargetDefinition()
- 10 core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php \Drupal\Core\TypedData\DataReferenceDefinition::setTargetDefinition()
- 11.x core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php \Drupal\Core\TypedData\DataReferenceDefinition::setTargetDefinition()
Sets the definition of the referenced data.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $definition: The target definition to set.
Return value
$this
File
-
core/
lib/ Drupal/ Core/ TypedData/ DataReferenceDefinition.php, line 60
Class
- DataReferenceDefinition
- A typed data definition class for defining references.
Namespace
Drupal\Core\TypedDataCode
public function setTargetDefinition(DataDefinitionInterface $definition) {
$this->targetDefinition = $definition;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.