function acquia_spi_get_modules in Acquia Connector 7
Same name and namespace in other branches
- 6.2 acquia_spi/acquia_spi.module \acquia_spi_get_modules()
- 6 acquia_spi/acquia_spi.module \acquia_spi_get_modules()
- 7.3 acquia_spi/acquia_spi.module \acquia_spi_get_modules()
- 7.2 acquia_spi/acquia_spi.module \acquia_spi_get_modules()
Gather information about modules on the site.
Return value
An associative array keyed by filename of associative arrays with information on the modules.
1 call to acquia_spi_get_modules()
- acquia_spi_get in acquia_spi/
acquia_spi.module - Gather site profile information about this site.
File
- acquia_spi/
acquia_spi.module, line 128 - Send site profile information (SPI) and system data to Acquia Network.
Code
function acquia_spi_get_modules() {
$modules = system_rebuild_module_data();
$result = array();
$keys_to_send = array(
'name',
'version',
'package',
'core',
'project',
);
foreach ($modules as $filename => $file) {
if (!empty($file->info['hidden'])) {
// Skip hidden modules.
continue;
}
$info = array();
$info['status'] = $file->status;
foreach ($keys_to_send as $key) {
$info[$key] = isset($file->info[$key]) ? $file->info[$key] : '';
}
$info['filename'] = $file->filename;
$result[] = $info;
}
return $result;
}