You are here

public static function BrightcovePlaylist::typeAllowedValues in Brightcove Video Connect 8.2

Same name and namespace in other branches
  1. 8 src/Entity/BrightcovePlaylist.php \Drupal\brightcove\Entity\BrightcovePlaylist::typeAllowedValues()
  2. 3.x src/Entity/BrightcovePlaylist.php \Drupal\brightcove\Entity\BrightcovePlaylist::typeAllowedValues()

Implements callback_allowed_values_function().

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $definition: The field storage definition.

\Drupal\Core\Entity\FieldableEntityInterface|null $entity: (optional) The entity context if known, or NULL if the allowed values are being collected without the context of a specific entity.

bool &$cacheable: (optional) If an $entity is provided, the $cacheable parameter should be modified by reference and set to FALSE if the set of allowed values returned was specifically adjusted for that entity and cannot not be reused for other entities. Defaults to TRUE.

Return value

array The array of allowed values. Keys of the array are the raw stored values (number or text), values of the array are the display labels. If $entity is NULL, you should return the list of all the possible allowed values in any context so that other code (e.g. Views filters) can support the allowed values for all possible entities and bundles.

Throws

\Exception If an invalid type was given.

File

src/Entity/BrightcovePlaylist.php, line 158

Class

BrightcovePlaylist
Defines the Brightcove Playlist.

Namespace

Drupal\brightcove\Entity

Code

public static function typeAllowedValues(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE) {
  return self::getTypes();
}