function ContextConditionBreakpoint::options_form in Context Breakpoint 7
Options form. Provide additional options for your condition.
Overrides context_condition::options_form
File
- plugins/
context_condition_breakpoint.inc, line 262 - context_condition_resolution.inc Provides the context CTools plugin base class.
Class
- ContextConditionBreakpoint
- @file context_condition_resolution.inc Provides the context CTools plugin base class.
Code
function options_form($context = NULL) {
$defaults = $this
->fetch_from_context($context, 'options');
$form = array(
'autoreload' => array(
'#type' => 'checkbox',
'#title' => t('Auto-reload'),
'#description' => t('When enabled, the page will automatically reload when when this breakpoint becomes active or unactive(due to resizing the browser).<br /> Only works for width, height and aspect-ratio.'),
'#default_value' => isset($defaults['autoreload']) ? $defaults['autoreload'] : 0,
),
'global' => array(
'#type' => 'markup',
'#markup' => '<div>' . l(t('Site-wide Context Breakpoint settings'), 'admin/config/media/context-breakpoint') . ' - ' . t('Includes performance-relevant caching settings.') . '</div>',
),
);
return $form;
}