public function ConfigLister::getTypeNameByConfigName in Configuration Update Manager 8
Returns the config type name for a given config object.
Parameters
string $name: Name of the config object.
Return value
string Name of the config type that this is an instance of, determined by prefix. NULL for simple configuration.
Overrides ConfigListInterface::getTypeNameByConfigName
File
- src/
ConfigLister.php, line 123
Class
- ConfigLister
- Provides methods related to config listing.
Namespace
Drupal\config_updateCode
public function getTypeNameByConfigName($name) {
$definitions = $this
->listTypes();
foreach ($this->typesByPrefix as $prefix => $entity_type) {
if (strpos($name, $prefix . '.') === 0) {
return $entity_type;
}
}
return NULL;
}