function BundleConstraint::getBundleOption
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\BundleConstraint::getBundleOption()
- 10 core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\BundleConstraint::getBundleOption()
- 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\BundleConstraint::getBundleOption()
Gets the bundle option as array.
Return value
array
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ BundleConstraint.php, line 37
Class
- BundleConstraint
- Checks if a value is a valid entity type.
Namespace
Drupal\Core\Entity\Plugin\Validation\ConstraintCode
public function getBundleOption() {
// Support passing the bundle as string, but force it to be an array.
if (!is_array($this->bundle)) {
$this->bundle = [
$this->bundle,
];
}
return $this->bundle;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.