You are here

function ds_field_unique in Display Suite 7

Same name and namespace in other branches
  1. 7.2 modules/ds_ui/includes/ds.fields.inc \ds_field_unique()

Return whether a field machine name is unique.

1 string reference to 'ds_field_unique'
ds_shared_form in ./ds.fields.inc
Shared form for all all fields.

File

./ds.fields.inc, line 186
Administrative functions for managing custom fields for every entity.

Code

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