function LanguageItem::getPossibleValues
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php \Drupal\Core\Field\Plugin\Field\FieldType\LanguageItem::getPossibleValues()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php \Drupal\Core\Field\Plugin\Field\FieldType\LanguageItem::getPossibleValues()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php \Drupal\Core\Field\Plugin\Field\FieldType\LanguageItem::getPossibleValues()
Overrides OptionsProviderInterface::getPossibleValues
2 calls to LanguageItem::getPossibleValues()
- LanguageItem::getSettableOptions in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ LanguageItem.php - Returns an array of settable values with labels for display.
- LanguageItem::getSettableValues in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ LanguageItem.php - Returns an array of settable values.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ LanguageItem.php, line 128
Class
- LanguageItem
- Defines the 'language' entity field item.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function getPossibleValues(AccountInterface $account = NULL) {
return array_keys(\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_ALL));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.