You are here

function simplemenu_running in SimpleMenu 6

@brief Is the simplemenu being built?

Track whether the simplemenu is currently being built. This allows other modules to alter their behaviour for the simplemenu.

This function is safe in a multi-website or even a multi-server environment.

Parameters

optional boolean $new_state: Set to TRUE when the simplemenu is being generated. Set to FALSE at the end of the generation process.

Return value

Boolean TRUE if simplemenu is currently being built.

3 calls to simplemenu_running()
simplemenu_get_menu in ./simplemenu.module
Render an HTML list of links for a given menu.
simplemenu_inactive_parents_theme_menu_item_link in ./simplemenu_inactive_parents.module
\brief Transform the menu item link.
simplemenu_multi_menu_theme_menu_item_link in ./simplemenu_multi_menu.module
\brief Transform the menu item link.

File

./simplemenu.module, line 440
Creates a simplemenu.

Code

function simplemenu_running($new_state = NULL) {
  static $state = FALSE;
  if (!is_null($new_state)) {
    $state = (bool) $state;
  }
  return $state;
}