class isotope_reaction in Views Isotope (Deprecated) 7.2
Expose isotope configurations as context reactions.
Hierarchy
- class \context_reaction
- class \isotope_reaction
Expanded class hierarchy of isotope_reaction
2 string references to 'isotope_reaction'
- views_isotope_context_plugins in ./
views_isotope.module - Implements hook_context_plugins().
- views_isotope_context_registry in ./
views_isotope.module - Implements hook_context_registry().
File
- plugins/
context/ views_isotope_reaction.inc, line 10 - Contains the isotope_reaction subclass.
View source
class isotope_reaction extends context_reaction {
/**
* Editor form.
*/
public function editor_form($context) {
$form = $this
->options_form($context);
return $form;
}
/**
* Submit handler for editor form.
*/
public function editor_form_submit($context, $values) {
return $values;
}
/**
* Configuration form for the Isotope context reaction.
*/
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' => views_isotope_available_configs(),
'#title' => t('Choose Isotope Configuration'),
'#default_value' => isset($values['config']) ? $values['config'] : 'isotope_default_config',
),
);
return $form;
}
/**
* Display a message to the user.
*/
public function execute() {
foreach ($this
->get_contexts() as $k => $v) {
if (!empty($v->reactions[$this->plugin]['config'])) {
return $v->reactions[$this->plugin]['config'];
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
function | Retrieve options from the context provided. | 1 | |
context_reaction:: |
function | Retrieve active contexts that have values for this reaction. | ||
context_reaction:: |
function | Options form submit handler. | 3 | |
context_reaction:: |
function | Settings form. Provide variable settings for your reaction. | 2 | |
context_reaction:: |
function | Clone our references when we're being cloned. | ||
context_reaction:: |
function | Constructor. Do not override. | ||
isotope_reaction:: |
public | function | Editor form. | |
isotope_reaction:: |
public | function | Submit handler for editor form. | |
isotope_reaction:: |
public | function | Display a message to the user. | |
isotope_reaction:: |
public | function |
Configuration form for the Isotope context reaction. Overrides context_reaction:: |