You are here

function environment_indicator_get_all in Environment Indicator 8.2

Same name and namespace in other branches
  1. 7.2 environment_indicator.module \environment_indicator_get_all()

Helper function to get all environments.

Parameters

bool $fixed: If TRUE it will only return fixed environments. Fixed environments are those that do not use a regular expression for detection.

4 calls to environment_indicator_get_all()
environment_indicator_get_active in ./environment_indicator.module
Helper function to get the active indicator.
environment_indicator_permission in ./environment_indicator.module
Implements hook_permission().
theme_environment_indicator_indicator_name in ./environment_indicator.theme.inc
Theme function for the indicator name.
_environment_indicator_switcher_menu in ./environment_indicator.module
Helper function to generate a menu with the environments to switch to.

File

./environment_indicator.module, line 267
Module implementation file.

Code

function environment_indicator_get_all($fixed = FALSE) {
  $environments = entity_load_multiple('environment_indicator');
  $environments = array_filter($environments, '_environment_indicator_active');

  // Check if the regular expression is a environment name.
  return $fixed ? array_filter($environments, '_environment_indicator_regex_filter') : $environments;
}