ConfigFactoryWrapper.php in Devel 4.x
File
webprofiler/src/Config/ConfigFactoryWrapper.php
View source
<?php
namespace Drupal\webprofiler\Config;
use Drupal\Core\Config\ConfigFactory;
use Drupal\webprofiler\DataCollector\ConfigDataCollector;
class ConfigFactoryWrapper extends ConfigFactory {
private $dataCollector;
public function get($name) {
$result = parent::get($name);
$this->dataCollector
->addConfigName($name);
return $result;
}
public function loadMultiple(array $names) {
$result = parent::loadMultiple($names);
foreach (array_keys($result) as $name) {
$this->dataCollector
->addConfigName($name);
}
return $result;
}
public function setDataCollector(ConfigDataCollector $dataCollector) {
$this->dataCollector = $dataCollector;
}
}