1 entity_layout_context_handler.inc EntityLayoutContext::formSubmit($form, &$form_state)

Submit handler for the settings form for this context item.

Overrides LayoutContext::formSubmit

File

core/modules/layout/plugins/context/entity_layout_context_handler.inc, line 80
Layout context handler for entities.

Class

EntityLayoutContext
@file Layout context handler for entities.

Code

function formSubmit($form, &$form_state) {
  $excluded = backdrop_map_assoc(array('cancel', 'submit', 'form_build_id', 'form_token', 'form_id', 'op', 'add', 'context', 'load_context_nojs', 'context_add_button'));
  $settings = array_diff_key($form_state['values'], $excluded);
  // This produces config keys for contexts in the format "node1" or "user3".
  $this->name = $this->plugin . $settings['id'];
  $this->settings = $settings;
}