protected function IgnoreFilter::matchConfigName in Config Ignore 8.2
Match a config entity name against the list of ignored config entities.
Parameters
string $config_name: The name of the config entity to match against all ignored entities.
Return value
bool True, if the config entity is to be ignored, false otherwise.
2 calls to IgnoreFilter::matchConfigName()
- IgnoreFilter::filterExists in src/
Plugin/ ConfigFilter/ IgnoreFilter.php - IgnoreFilter::filterRead in src/
Plugin/ ConfigFilter/ IgnoreFilter.php
File
- src/
Plugin/ ConfigFilter/ IgnoreFilter.php, line 78
Class
- IgnoreFilter
- Provides a ignore filter that reads partly from the active storage.
Namespace
Drupal\config_ignore\Plugin\ConfigFilterCode
protected function matchConfigName($config_name) {
if (Settings::get('config_ignore_deactivate')) {
// Allow deactivating config_ignore in settings.php. Do not match any name
// in that case and allow a normal configuration import to happen.
return FALSE;
}
// If the string is an excluded config, don't ignore it.
if (in_array(static::FORCE_EXCLUSION_PREFIX . $config_name, $this->configuration['ignored'], TRUE)) {
return FALSE;
}
foreach ($this->configuration['ignored'] as $config_ignore_setting) {
// Split the ignore settings so that we can ignore individual keys.
$ignore = explode(':', $config_ignore_setting, 2);
if (self::wildcardMatch($ignore[0], $config_name)) {
return TRUE;
}
}
return FALSE;
}