You are here

protected function AutoEntityLabelManager::getConfig in Automatic Entity Label 8

Same name and namespace in other branches
  1. 8.3 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::getConfig()
  2. 8.2 src/AutoEntityLabelManager.php \Drupal\auto_entitylabel\AutoEntityLabelManager::getConfig()

Returns automatic label configuration of the content entity bundle.

Parameters

string $value: The configuration value to get.

Return value

\Drupal\Core\Config\ImmutableConfig Return the config.

4 calls to AutoEntityLabelManager::getConfig()
AutoEntityLabelManager::generateLabel in src/AutoEntityLabelManager.php
Generates the label according to the settings.
AutoEntityLabelManager::hasAutoLabel in src/AutoEntityLabelManager.php
Determines if the entity bundle has auto entity label enabled.
AutoEntityLabelManager::hasOptionalAutoLabel in src/AutoEntityLabelManager.php
Determines if the entity bundle has an optional automatic label.
AutoEntityLabelManager::setLabel in src/AutoEntityLabelManager.php
Sets the automatically generated entity label.

File

src/AutoEntityLabelManager.php, line 266

Class

AutoEntityLabelManager
AutoEntityLabelManager class.

Namespace

Drupal\auto_entitylabel

Code

protected function getConfig($value) {
  if (!isset($this->config)) {
    $this->config = $this->configFactory
      ->get('auto_entitylabel.settings');
  }
  $key = $this->bundle_entity_type . '_' . $this->entity_bundle;
  return $this->config
    ->get($key . '_' . $value);
}