private function EdgeEntityType::getConfigWithEntityLabels in Apigee Edge 8
Returns the config object that contains the entity labels.
Config object should define values for the following keys:
- entity_label_singular
- entity_label_plural.
Return value
\Drupal\Core\Config\ImmutableConfig|null Config object.
Throws
\Drupal\apigee_edge\Exception\RuntimeException If the provided config object does not exists.
1 call to EdgeEntityType::getConfigWithEntityLabels()
- EdgeEntityType::getEntityLabelFromConfig in src/
Entity/ EdgeEntityType.php - Returns entity label from config if exists.
File
- src/
Entity/ EdgeEntityType.php, line 121
Class
- EdgeEntityType
- Provides an implementation of an Apigee Edge entity type and its metadata.
Namespace
Drupal\apigee_edge\EntityCode
private function getConfigWithEntityLabels() : ?ImmutableConfig {
if (empty($this->config_with_labels)) {
return NULL;
}
$config = \Drupal::config($this->config_with_labels);
if ($config
->isNew()) {
throw new RuntimeException("Config object called {$this->config_with_labels} does not exists.");
}
return $config;
}