class title_override_reaction_override in Title Override 7.2
@file Context reaction for Metatag.
Hierarchy
- class \context_reaction
Expanded class hierarchy of title_override_reaction_override
2 string references to 'title_override_reaction_override'
- title_override_context_plugins in ./
title_override.module - Implements hook_context_plugins()
- title_override_context_registry in ./
title_override.module - Implements hook_context_registry()
File
- ./
title_override.context.inc, line 7 - Context reaction for Metatag.
View source
class title_override_reaction_override extends context_reaction {
function options_form($context) {
$values = $this
->fetch_from_context($context);
$form = array();
$form['title'] = array(
'#title' => t('Title tag'),
'#description' => t('Overrides the page title'),
'#type' => 'textfield',
'#maxlength' => 400,
'#default_value' => isset($values['title']) ? $values['title'] : '',
);
$form['admin'] = array(
'#type' => 'hidden',
'#value' => TRUE,
);
$form['tokens'] = array(
'#theme' => 'token_tree',
'#token_types' => 'all',
// The token types that have specific context. Can be multiple token types like 'term' and/or 'user'
'#global_types' => TRUE,
// A boolean TRUE or FALSE whether to include 'global' context tokens like [current-user:*] or [site:*]. Defaults to TRUE.
'#click_insert' => TRUE,
);
return $form;
}
/**
* Output a list of active contexts.
*/
function execute() {
$contexts = context_active_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions['title_override'])) {
$title_override =& drupal_static('title_override');
$title_override = $context->reactions['title_override']['title'];
}
}
}
}
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. | ||
title_override_reaction_override:: |
function | Output a list of active contexts. | ||
title_override_reaction_override:: |
function |
Overrides context_reaction:: |