function MemoryStorage::listAll
Same name in other branches
- 9 core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::listAll()
- 10 core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::listAll()
- 11.x core/lib/Drupal/Core/Config/MemoryStorage.php \Drupal\Core\Config\MemoryStorage::listAll()
Overrides StorageInterface::listAll
File
-
core/
lib/ Drupal/ Core/ Config/ MemoryStorage.php, line 113
Class
- MemoryStorage
- Provides an in memory configuration storage.
Namespace
Drupal\Core\ConfigCode
public function listAll($prefix = '') {
if (empty($this->config[$this->collection])) {
// If the collection is empty no keys are set.
return [];
}
$names = array_keys($this->config[$this->collection]);
if ($prefix !== '') {
$names = array_filter($names, function ($name) use ($prefix) {
return strpos($name, $prefix) === 0;
});
}
return $names;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.