You are here

public function IsotopeReaction::optionsForm in Brainstorm profile 7

Configuration form for the Isotope context reaction.

1 call to IsotopeReaction::optionsForm()
IsotopeReaction::editorForm in modules/custom/views_isotope/plugins/context/views_isotope_reaction.inc
Editor form.

File

modules/custom/views_isotope/plugins/context/views_isotope_reaction.inc, line 31
Contains the isotope_reaction subclass.

Class

IsotopeReaction
Expose isotope configurations as context reactions.

Code

public function optionsForm($context) {
  $values = $this
    ->fetch_from_context($context);
  $form = [
    '#tree' => TRUE,
    '#title' => t('Isotope'),
    'pre' => [
      '#type' => 'item',
      '#title' => t('Isotope Configuration'),
      '#description' => t('You can manage these configurations at !link.', [
        '!link' => l(t('Configure Isotope'), 'admin/config/user-interface/isotope'),
      ]),
    ],
    // Choose the config here.
    'config' => [
      '#type' => 'select',
      '#options' => views_isotope_available_configs(),
      '#title' => t('Choose Isotope Configuration'),
      '#default_value' => isset($values['config']) ? $values['config'] : 'isotope_default_config',
    ],
  ];
  return $form;
}