You are here

function context_reaction_theme::options_form in Context 7.3

Same name and namespace in other branches
  1. 6.3 plugins/context_reaction_theme.inc \context_reaction_theme::options_form()
  2. 6 plugins/context_reaction_theme.inc \context_reaction_theme::options_form()

Allow admins to provide a section title, section subtitle and section class.

Overrides context_reaction::options_form

1 call to context_reaction_theme::options_form()
context_reaction_theme::editor_form in plugins/context_reaction_theme.inc
Editor form.
1 method overrides context_reaction_theme::options_form()
context_reaction_theme_html::options_form in plugins/context_reaction_theme_html.inc
Allow admins to provide additional body classes.

File

plugins/context_reaction_theme.inc, line 30

Class

context_reaction_theme
Expose themes as context reactions.

Code

function options_form($context) {
  $values = $this
    ->fetch_from_context($context);
  $form = array(
    '#tree' => TRUE,
    '#title' => t('Theme variables'),
    'title' => array(
      '#title' => t('Section title'),
      '#description' => t('Provides this text as a <strong>$section_title</strong> variable for display in page.tpl.php when this context is active.'),
      '#type' => 'textfield',
      '#maxlength' => 255,
      '#default_value' => isset($values['title']) ? $values['title'] : '',
    ),
    'subtitle' => array(
      '#title' => t('Section subtitle'),
      '#description' => t('Provides this text as a <strong>$section_subtitle</strong> variable for display in page.tpl.php when this context is active.'),
      '#type' => 'textfield',
      '#maxlength' => 255,
      '#default_value' => isset($values['subtitle']) ? $values['subtitle'] : '',
    ),
  );
  return $form;
}