1 system.test | SystemInfoAlterTestCase::getSystemInfo($name, $type) |
Returns the info array as it is stored in {system}.
Parameters
$name: The name of the record in {system}.
$type: The type of record in {system}.
Return value
Array of info, or FALSE if the record is not found.:
File
- core/
modules/ system/ tests/ system.test, line 2116 - Tests for system.module.
Class
- SystemInfoAlterTestCase
- Tests the effectiveness of hook_system_info_alter().
Code
function getSystemInfo($name, $type) {
$raw_info = db_query("SELECT info FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField();
return $raw_info ? unserialize($raw_info) : FALSE;
}