public function BaseFieldDefinition::setTargetBundle
public BaseFieldDefinition::setTargetBundle($bundle)
Sets the bundle this field is defined for.
Parameters
string|null $bundle: The bundle, or NULL if the field is not bundle-specific.
Return value
$this
File
- core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 621
Class
- BaseFieldDefinition
- A class for defining entity fields.
Namespace
Drupal\Core\FieldCode
public function setTargetBundle($bundle) { $this->definition['bundle'] = $bundle; return $this; }
© 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!Field!BaseFieldDefinition.php/function/BaseFieldDefinition::setTargetBundle/8.1.x