You are here

function ds_view_mode_unique in Display Suite 7.2

Same name and namespace in other branches
  1. 7 ds.view_modes.inc \ds_view_mode_unique()

Return whether a view mode machine name is unique.

1 string reference to 'ds_view_mode_unique'
ds_edit_view_mode_form in modules/ds_ui/includes/ds.view_modes.inc
Manage a custom view mode.

File

modules/ds_ui/includes/ds.view_modes.inc, line 124
Administrative functions for managing view modes for every entity.

Code

function ds_view_mode_unique($name) {
  ctools_include('export');
  $view_modes = ctools_export_crud_load_all('ds_view_modes');
  $value = strtr($name, array(
    '-' => '_',
  ));
  return isset($view_modes[$value]) ? TRUE : FALSE;
}