Get all configuration names and folders for a list of modules or themes.
string $type: Type of components: 'module' | 'theme' | 'profile'
array $list: Array of theme or module names.
array Folders indexed by configuration name.
public function getComponentNames($type, array $list) {
$extension = '.' . $this
->getFileExtension();
$folders = array();
foreach ($list as $name) {
$directory = $this
->getComponentFolder($type, $name);
if (file_exists($directory)) {
$files = glob($directory . '/*' . $extension);
foreach ($files as $filename) {
$name = basename($filename, $extension);
$folders[$name] = $directory;
}
}
}
return $folders;
}