function EntityReferenceItem::getSettableValues
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::getSettableValues()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::getSettableValues()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::getSettableValues()
Overrides OptionsProviderInterface::getSettableValues
1 call to EntityReferenceItem::getSettableValues()
- EntityReferenceItem::getPossibleValues in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php - Returns an array of possible values.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php, line 663
Class
- EntityReferenceItem
- Defines the 'entity_reference' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function getSettableValues(?AccountInterface $account = NULL) {
// Flatten options first, because "settable options" may contain group
// arrays.
$flatten_options = OptGroup::flattenOptions($this->getSettableOptions($account));
return array_keys($flatten_options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.