You are here

function context_reaction_delta::options_form in Delta 7.3

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

@todo

Overrides context_reaction::options_form

File

plugins/context/context_reaction_delta.inc, line 10

Class

context_reaction_delta
Expose themes as context reactions.

Code

function options_form($context) {
  $values = $this
    ->fetch_from_context($context);
  $options = _delta_options();
  $form = array(
    '#tree' => TRUE,
    '#title' => t('Delta Override Template'),
  );
  $form['delta_template'] = array(
    '#type' => count($options) > 10 ? 'select' : 'radios',
    '#title' => t('Select Custom theme settings template.'),
    '#description' => empty($options) ? t('There are no valid (enabled) Delta templates available.') : t('The theme settings of the selected Delta template will override the default theme settings for all pages that match this context.'),
    '#default_value' => isset($values['delta_template']) ? $values['delta_template'] : NULL,
    '#options' => $options,
  );
  return $form;
}