function SystemInfoAlterTestCase::getSystemInfo in Drupal 7
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.
1 call to SystemInfoAlterTestCase::getSystemInfo()
- SystemInfoAlterTestCase::testSystemInfoAlter in modules/
system/ system.test - Tests that {system}.info is rebuilt after a module that implements hook_system_info_alter() is enabled. Also tests if core *_list() functions return freshly altered info.
File
- modules/
system/ system.test, line 2427 - 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;
}