You are here

function ds_extras_region_to_block_unique in Display Suite 8.2

Same name and namespace in other branches
  1. 8.3 modules/ds_extras/ds_extras.module \ds_extras_region_to_block_unique()
  2. 7.2 modules/ds_extras/includes/ds_extras.admin.inc \ds_extras_region_to_block_unique()
  3. 7 modules/ds_extras/ds_extras.admin.inc \ds_extras_region_to_block_unique()

Return unique region to block.

1 string reference to 'ds_extras_region_to_block_unique'
ds_extras_form_entity_view_display_edit_form_alter in modules/ds_extras/ds_extras.module
Implements hook_form_FORM_ID_alter().

File

modules/ds_extras/ds_extras.module, line 187
Display Suite extras main functions.

Code

function ds_extras_region_to_block_unique($name) {
  $region_blocks = \Drupal::config('ds_extras.settings')
    ->get('region_blocks');
  if (empty($region_blocks)) {
    $region_blocks = array();
  }
  $value = strtr($name, array(
    '-' => '_',
  ));
  return isset($region_blocks[$value]) ? TRUE : FALSE;
}