You are here

function hook_rules_link_load in Rules Link 7

Same name and namespace in other branches
  1. 7.2 rules_link.api.php \hook_rules_link_load()

Acts on rules links being loaded from the database.

This hook is invoked during rules link loading, which is handled by entity_load(), via the EntityCRUDController.

Parameters

array $rules_links: An array of rules link entities being loaded, keyed by id.

See also

hook_entity_load()

File

./rules_link.api.php, line 23
Hooks provided by this module.

Code

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