function SystemInfoAlterTestCase::getSystemInfo

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 2498

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.