You are here

function menu_position_read_rule in Menu Position 7.2

Same name and namespace in other branches
  1. 7 menu_position.admin.inc \menu_position_read_rule()

Retrieves a menu position rule from the database.

Parameters

$rid: The ID of the requested rule.

Return value

An associative array for the requested rule.

1 call to menu_position_read_rule()
menu_position_edit_rule_form in ./menu_position.admin.inc
Menu callback; Edits rules.

File

./menu_position.admin.inc, line 514
Provides infrequently used functions and hooks for menu_position.

Code

function menu_position_read_rule($rid) {
  $rule = db_query('SELECT * FROM {menu_position_rules} WHERE rid = :rid', array(
    ':rid' => $rid,
  ))
    ->fetchAssoc();
  $rule['conditions'] = unserialize($rule['conditions']);
  return $rule;
}