You are here

function ds_get_build_modes in Display Suite 6.3

Same name and namespace in other branches
  1. 6 ds.module \ds_get_build_modes()
  2. 6.2 ds.module \ds_get_build_modes()

Api function to return all build modes.

Parameters

string $module Return build modes for a module.:

boolean $reset Whether to reset the build modes.:

Return value

array Collection of build modes.

11 calls to ds_get_build_modes()
ds_buildmodes_matrix_form in includes/ds.buildmodes.inc
Build modes matrix form.
ds_build_modes_page in includes/ds.buildmodes.inc
Build modes overview.
ds_build_mode_form_validate in includes/ds.buildmodes.inc
Validate new custom build mode submission.
ds_display_overview_form in includes/ds.display.inc
Menu callback; presents a listing of fields display settings for an object type.
ds_get_active_build_modes in ./ds.module
API function to retrieve ACTIVE build modes for a module

... See full list

File

./ds.module, line 595

Code

function ds_get_build_modes($module = NULL, $reset = FALSE) {
  $build_modes = variable_get('ds_all_build_modes', array());
  if (empty($build_modes) || $reset) {
    require_once 'includes/ds.registry.inc';
    $build_modes = _ds_register_build_modes();
  }
  if ($module != NULL) {
    return $build_modes[$module];
  }
  else {
    return $build_modes;
  }
}