You are here

class ConfigFactoryWrapper in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper
  2. 8.2 webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper
  3. 4.x webprofiler/src/Config/ConfigFactoryWrapper.php \Drupal\webprofiler\Config\ConfigFactoryWrapper

Wraps a config factory to be able to figure out all used config files.

Hierarchy

Expanded class hierarchy of ConfigFactoryWrapper

File

webprofiler/src/Config/ConfigFactoryWrapper.php, line 11

Namespace

Drupal\webprofiler\Config
View source
class ConfigFactoryWrapper extends ConfigFactory {

  /**
   * @var \Drupal\webprofiler\DataCollector\ConfigDataCollector
   */
  private $dataCollector;

  /**
   * {@inheritdoc}
   */
  public function get($name) {
    $result = parent::get($name);
    $this->dataCollector
      ->addConfigName($name);
    return $result;
  }

  /**
   * {@inheritdoc}
   */
  public function loadMultiple(array $names) {
    $result = parent::loadMultiple($names);
    foreach (array_keys($result) as $name) {
      $this->dataCollector
        ->addConfigName($name);
    }
    return $result;
  }

  /**
   * @param \Drupal\webprofiler\DataCollector\ConfigDataCollector $dataCollector
   */
  public function setDataCollector(ConfigDataCollector $dataCollector) {
    $this->dataCollector = $dataCollector;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigFactory::$cache protected property Cached configuration objects.
ConfigFactory::$configFactoryOverrides protected property An array of config factory override objects ordered by priority.
ConfigFactory::$eventDispatcher protected property An event dispatcher instance to use for configuration events.
ConfigFactory::$storage protected property A storage instance for reading and writing configuration data.
ConfigFactory::$typedConfigManager protected property The typed config manager.
ConfigFactory::addOverride public function Adds config factory override services. Overrides ConfigFactoryInterface::addOverride
ConfigFactory::clearStaticCache public function Clears the config factory static cache. Overrides ConfigFactoryInterface::clearStaticCache
ConfigFactory::createConfigObject protected function Creates a configuration object.
ConfigFactory::doGet protected function Returns a configuration object for a given name.
ConfigFactory::doLoadMultiple protected function Returns a list of configuration objects for the given names.
ConfigFactory::getCacheKeys public function The cache keys associated with the state of the config factory. Overrides ConfigFactoryInterface::getCacheKeys
ConfigFactory::getConfigCacheKey protected function Gets the static cache key for a given config name.
ConfigFactory::getConfigCacheKeys protected function Gets all the cache keys that match the provided config name.
ConfigFactory::getEditable public function Returns an mutable configuration object for a given name. Overrides ConfigFactoryInterface::getEditable
ConfigFactory::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.
ConfigFactory::listAll public function Gets configuration object names starting with a given prefix. Overrides ConfigFactoryInterface::listAll
ConfigFactory::loadOverrides protected function Get arbitrary overrides for the named configuration objects from modules.
ConfigFactory::onConfigDelete public function Removes stale static cache entries when configuration is deleted.
ConfigFactory::onConfigSave public function Updates stale static cache entries when configuration is saved.
ConfigFactory::propagateConfigOverrideCacheability protected function Propagates cacheability of config overrides to cached config objects.
ConfigFactory::rename public function Renames a configuration object using the storage. Overrides ConfigFactoryInterface::rename
ConfigFactory::reset public function Resets and re-initializes configuration objects. Internal use only. Overrides ConfigFactoryInterface::reset
ConfigFactory::__construct public function Constructs the Config factory.
ConfigFactoryWrapper::$dataCollector private property
ConfigFactoryWrapper::get public function Returns an immutable configuration object for a given name. Overrides ConfigFactory::get
ConfigFactoryWrapper::loadMultiple public function Returns a list of configuration objects for the given names. Overrides ConfigFactory::loadMultiple
ConfigFactoryWrapper::setDataCollector public function