function hook_rules_config_load

Act on rules configuration being loaded from the database.

This hook is invoked during rules configuration loading, which is handled by entity_load(), via classes RulesEntityController and EntityCRUDController.

Parameters

array $configs: An array of rules configurations being loaded, keyed by id.

Related topics

File

./rules.api.php, line 769

Code

function hook_rules_config_load($configs) {
    $result = db_query('SELECT id, foo FROM {mytable} WHERE id IN(:ids)', array(
        ':ids' => array_keys($configs),
    ));
    foreach ($result as $record) {
        $configs[$record->id]->foo = $record->foo;
    }
}