public function BundleConstraint::getBundleOption

Gets the bundle option as array.

Return value

array

File

drupal/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/BundleConstraint.php, line 47
Contains \Drupal\Core\Validation\Constraint\BundleConstraint.

Class

BundleConstraint
Checks if a value is a valid entity type.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public function getBundleOption() {

  // Support passing the bundle as string, but force it to be an array.
  if (!is_array($this->bundle)) {
    $this->bundle = array(
      $this->bundle,
    );
  }
  return $this->bundle;
}