You are here

function hook_ds_layout_settings_alter in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 ds.api.php \hook_ds_layout_settings_alter()
  2. 8.3 ds.api.php \hook_ds_layout_settings_alter()
  3. 7.2 ds.api.php \hook_ds_layout_settings_alter()
  4. 7 ds.api.php \hook_ds_layout_settings_alter()

Modify the layout settings just before they get saved.

Parameters

array $record: The record just before it gets saved into the database.

\Drupal\Core\Form\FormStateInterface $form_state: The form_state values.

1 invocation of hook_ds_layout_settings_alter()
ds_field_ui_layouts_save in includes/field_ui.inc
Save the layout settings from the 'Manage display' screen.

File

./ds.api.php, line 72
Hooks provided by Display Suite module.

Code

function hook_ds_layout_settings_alter(array $record, FormStateInterface $form_state) {
  $record['layout']['settings']['classes'] = [
    'layout-class',
  ];
}