class LingotekFakeConfigFactory in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
- 3.3.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
- 3.5.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
- 3.6.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
- 3.7.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
- 3.8.x tests/modules/lingotek_test/src/LingotekFakeConfigFactory.php \Drupal\lingotek_test\LingotekFakeConfigFactory
Hierarchy
- class \Drupal\Core\Config\ConfigFactory implements \Symfony\Component\EventDispatcher\EventSubscriberInterface, ConfigFactoryInterface
- class \Drupal\lingotek_test\LingotekFakeConfigFactory implements ConfigFactoryInterface
Expanded class hierarchy of LingotekFakeConfigFactory
File
- tests/
modules/ lingotek_test/ src/ LingotekFakeConfigFactory.php, line 9
Namespace
Drupal\lingotek_testView source
class LingotekFakeConfigFactory extends ConfigFactory implements ConfigFactoryInterface {
public function get($name) {
$config = parent::get($name);
if ($name === 'lingotek.settings') {
if ($config instanceof LingotekFakeConfigWrapper && !$config->config instanceof ImmutableConfig) {
unset($this->cache[$name]);
$config = parent::get($name);
$config = new LingotekFakeConfigWrapper($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager, $config);
$this->cache[$name] = $config;
}
elseif (!$config instanceof LingotekFakeConfigWrapper) {
$config = new LingotekFakeConfigWrapper($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager, $config);
$this->cache[$name] = $config;
}
}
return $config;
}
public function getEditable($name) {
$config = parent::getEditable($name);
if ($name === 'lingotek.settings') {
if ($config instanceof LingotekFakeConfigWrapper && $config->config instanceof ImmutableConfig) {
unset($this->cache[$name]);
$config = parent::getEditable($name);
$config = new LingotekFakeConfigWrapper($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager, $config);
$this->cache[$name] = $config;
}
elseif (!$config instanceof LingotekFakeConfigWrapper) {
$config = new LingotekFakeConfigWrapper($name, $this->storage, $this->eventDispatcher, $this->typedConfigManager, $config);
$this->cache[$name] = $config;
}
}
return $config;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigFactory:: |
protected | property | Cached configuration objects. | |
ConfigFactory:: |
protected | property | An array of config factory override objects ordered by priority. | |
ConfigFactory:: |
protected | property | An event dispatcher instance to use for configuration events. | |
ConfigFactory:: |
protected | property | A storage instance for reading and writing configuration data. | |
ConfigFactory:: |
protected | property | The typed config manager. | |
ConfigFactory:: |
public | function |
Adds config factory override services. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
public | function |
Clears the config factory static cache. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
protected | function | Creates a configuration object. | |
ConfigFactory:: |
protected | function | Returns a configuration object for a given name. | |
ConfigFactory:: |
protected | function | Returns a list of configuration objects for the given names. | |
ConfigFactory:: |
public | function |
The cache keys associated with the state of the config factory. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
protected | function | Gets the static cache key for a given config name. | |
ConfigFactory:: |
protected | function | Gets all the cache keys that match the provided config name. | |
ConfigFactory:: |
public static | function | ||
ConfigFactory:: |
public | function |
Gets configuration object names starting with a given prefix. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
public | function |
Returns a list of configuration objects for the given names. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
protected | function | Get arbitrary overrides for the named configuration objects from modules. | |
ConfigFactory:: |
public | function | Removes stale static cache entries when configuration is deleted. | |
ConfigFactory:: |
public | function | Updates stale static cache entries when configuration is saved. | |
ConfigFactory:: |
protected | function | Propagates cacheability of config overrides to cached config objects. | |
ConfigFactory:: |
public | function |
Renames a configuration object using the storage. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
public | function |
Resets and re-initializes configuration objects. Internal use only. Overrides ConfigFactoryInterface:: |
|
ConfigFactory:: |
public | function | Constructs the Config factory. | |
LingotekFakeConfigFactory:: |
public | function |
Returns an immutable configuration object for a given name. Overrides ConfigFactory:: |
|
LingotekFakeConfigFactory:: |
public | function |
Returns a mutable configuration object for a given name. Overrides ConfigFactory:: |