function FieldStorageDefinitionInterface::getOptionsProvider
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getOptionsProvider()
- 10 core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getOptionsProvider()
- 11.x core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getOptionsProvider()
Gets an options provider for the given field item property.
Parameters
string $property_name: The name of the property to get options for; e.g., 'value'.
\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity for which the options should be provided.
Return value
\Drupal\Core\TypedData\OptionsProviderInterface|null An options provider, or NULL if no options are defined.
2 methods override FieldStorageDefinitionInterface::getOptionsProvider()
- BaseFieldDefinition::getOptionsProvider in core/
lib/ Drupal/ Core/ Field/ BaseFieldDefinition.php - Gets an options provider for the given field item property.
- FieldStorageConfig::getOptionsProvider in core/
modules/ field/ src/ Entity/ FieldStorageConfig.php - Gets an options provider for the given field item property.
File
-
core/
lib/ Drupal/ Core/ Field/ FieldStorageDefinitionInterface.php, line 156
Class
- FieldStorageDefinitionInterface
- Defines an interface for entity field storage definitions.
Namespace
Drupal\Core\FieldCode
public function getOptionsProvider($property_name, FieldableEntityInterface $entity);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.