class ConfigDevelSubscriberBase in Configuration development 8
Hierarchy
- class \Drupal\config_devel\EventSubscriber\ConfigDevelSubscriberBase
Expanded class hierarchy of ConfigDevelSubscriberBase
File
- src/
EventSubscriber/ ConfigDevelSubscriberBase.php, line 10
Namespace
Drupal\config_devel\EventSubscriberView source
class ConfigDevelSubscriberBase {
/**
* The configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
/**
* The configuration manager.
*
* @var \Drupal\Core\Config\ConfigManagerInterface
*/
protected $configManager;
/**
* Constructs the ConfigDevelAutoExportSubscriber object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The configuration factory.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.
*/
public function __construct(ConfigFactoryInterface $config_factory, ConfigManagerInterface $config_manager) {
$this->configFactory = $config_factory;
$this->configManager = $config_manager;
}
/**
* @param string $entity_type_id
*
* @return \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
*/
protected function getStorage($entity_type_id) {
return $this->configManager
->getEntityTypeManager()
->getStorage($entity_type_id);
}
/**
* @param \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $entity_storage
* @param string $config_name
*
* @return string
*/
protected function getEntityId(ConfigEntityStorageInterface $entity_storage, $config_name) {
// getIDFromConfigName adds a dot but getConfigPrefix has a dot already.
return $entity_storage::getIDFromConfigName($config_name, $entity_storage
->getEntityType()
->getConfigPrefix());
}
/**
* @return \Drupal\Core\Config\Config
*/
protected function getSettings() {
return $this->configFactory
->get('config_devel.settings');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigDevelSubscriberBase:: |
protected | property | The configuration factory. | |
ConfigDevelSubscriberBase:: |
protected | property | The configuration manager. | |
ConfigDevelSubscriberBase:: |
protected | function | ||
ConfigDevelSubscriberBase:: |
protected | function | ||
ConfigDevelSubscriberBase:: |
protected | function | ||
ConfigDevelSubscriberBase:: |
public | function | Constructs the ConfigDevelAutoExportSubscriber object. | 1 |