You are here

function nd_get_build_modes in Node displays 6

Api function to return all build modes.

Parameters

string $selector Return one build mode.:

boolean $reset Whether to reset the build modes.:

Return value

array All or one build mode(s).

4 calls to nd_get_build_modes()
nd_buildmodes_matrix_form in includes/nd.buildmodes.inc
Build modes matrix form.
nd_build_mode_form_validate in includes/nd.buildmodes.inc
Validate new custom display submission.
views_plugin_nd_node_view::options_form in views/views_plugin_nd_node_view.inc
_nd_menu in includes/nd.registry.inc
Return menu items.

File

./nd.module, line 468
Main node displays file.

Code

function nd_get_build_modes($selector = NULL, $reset = FALSE) {
  $build_modes = variable_get('nd_all_build_modes', array());
  if (empty($build_modes) || $reset) {
    require_once 'includes/nd.registry.inc';
    $build_modes = _nd_register_build_modes();
  }
  if ($selector != NULL) {
    return $build_modes[$selector]['build modes'];
  }
  else {
    return $build_modes;
  }
}