You are here

function ds_extras_ds_layout_settings_alter in Display Suite 7

Same name and namespace in other branches
  1. 7.2 modules/ds_extras/ds_extras.module \ds_extras_ds_layout_settings_alter()

Implements hook_ds_layout_settings_alter().

File

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

Code

function ds_extras_ds_layout_settings_alter($record, $form_state) {
  if (isset($form_state['values']['additional_settings']['ds_page_title_options']['page_option_type']) || isset($form_state['values']['page_option_type'])) {
    $record->settings['hide_page_title'] = isset($form_state['values']['additional_settings']['ds_page_title_options']['page_option_type']) ? $form_state['values']['additional_settings']['ds_page_title_options']['page_option_type'] : $form_state['values']['page_option_type'];
    $record->settings['page_option_title'] = isset($form_state['values']['additional_settings']['ds_page_title_options']['page_option_title']) ? $form_state['values']['additional_settings']['ds_page_title_options']['page_option_title'] : $form_state['values']['page_option_title'];
  }
}