public static function CustomLanguageManager::getCustomLanguages in Custom Language field 8
Gets the list of Custom languages as an array.
Resembling getStandardLanguageList.
Return value
\Drupal\languagefield\Entity\CustomLanguageInterface[] Custom language interface.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
2 calls to CustomLanguageManager::getCustomLanguages()
- CustomLanguageManager::getCustomLanguageList in src/
Entity/ CustomLanguageManager.php - Gets the list of Custom languages as an array.
- CustomLanguageManager::getLanguageConfigurationOptions in src/
Entity/ CustomLanguageManager.php - Helper function to get special languages.
File
- src/
Entity/ CustomLanguageManager.php, line 120
Class
- CustomLanguageManager
- Defines the CustomLanguage entity.
Namespace
Drupal\languagefield\EntityCode
public static function getCustomLanguages() {
if (static::$customLanguages == NULL) {
$storage = \Drupal::entityTypeManager()
->getStorage('custom_language');
static::$customLanguages = $storage
->loadMultiple();
}
return static::$customLanguages;
}