function rb_theme_static in Rules Bonus Pack 7
Helper function to store a value in a static variable.
Parameters
$name: The name of the value to store.
$value: The value to store, if omitted stored value for $name is returned.
Return value
If $value is not passed, the value stored for $name is returned.
3 calls to rb_theme_static()
- rb_theme_action_set_body_class in ./
rb_theme.rules.inc  - The 'rb_misc_action_set_body_class' action.
 - rb_theme_action_set_head_title in ./
rb_theme.rules.inc  - The 'rb_misc_action_set_head_title' action.
 - rb_theme_preprocess_html in ./
rb_theme.module  - Implement hook_preprocess_html().
 
File
- ./
rb_theme.module, line 37  - A necessary file for letting Drupal know this is a module. All functionality goes into rb_theme.rules.inc.
 
Code
function rb_theme_static($name, $value = null) {
  static $rb_theme_static;
  if (is_null($value) && isset($rb_theme_static[$name])) {
    return $rb_theme_static[$name];
  }
  elseif (is_null($value) && !isset($rb_theme_static[$name])) {
    return FALSE;
  }
  $rb_theme_static[$name] = $value;
}