You are here

public function isotope_reaction::options_form in Isotope (with Masonry and Packery) 7.2

Same name and namespace in other branches
  1. 7 plugins/isotope_reaction.inc \isotope_reaction::options_form()

Configuration form for the Isotope context reaction.

Overrides context_reaction::options_form

1 call to isotope_reaction::options_form()
isotope_reaction::editor_form in plugins/context/isotope_reaction.inc
Editor form.

File

plugins/context/isotope_reaction.inc, line 29
Contains the isotope_reaction subclass.

Class

isotope_reaction
Expose isotope configurations as context reactions.

Code

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