class amp_context_context_condition_is_amp_request in Accelerated Mobile Pages (AMP) 7
Hierarchy
Expanded class hierarchy of amp_context_context_condition_is_amp_request
2 string references to 'amp_context_context_condition_is_amp_request'
- amp_context_context_plugins in modules/
amp_context/ amp_context.module - Implements hook_context_plugins().
- amp_context_context_registry in modules/
amp_context/ amp_context.module - Implements hook_context_registry().
File
- modules/
amp_context/ plugins/ amp_context_context_condition_is_amp_request.inc, line 7 - Context condition plugins for AMP Context.
View source
class amp_context_context_condition_is_amp_request extends context_condition {
function condition_values() {
return array(
1 => t('Enabled'),
);
}
function editor_form($context = NULL) {
$form = parent::editor_form($context);
$form[1]['#title'] = t('Enabledx');
$form['#weight'] = -10;
return $form;
}
function execute() {
foreach ($this
->get_contexts() as $context) {
if (amp_is_amp_request()) {
$this
->condition_met($context);
}
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
amp_context_context_condition_is_amp_request:: |
function |
Condition values. Overrides context_condition:: |
||
amp_context_context_condition_is_amp_request:: |
function |
Context editor form for conditions. Overrides context_condition:: |
||
amp_context_context_condition_is_amp_request:: |
function | |||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
function | Condition form. | 3 | |
context_condition:: |
function | Condition form submit handler. | 2 | |
context_condition:: |
function | Marks a context as having met this particular condition. | ||
context_condition:: |
function | Check whether this condition is used by any contexts. Can be used to prevent expensive condition checks from being triggered when no contexts use this condition. | ||
context_condition:: |
function | Context editor form submit handler. | ||
context_condition:: |
function | Retrieve options from the context provided. | ||
context_condition:: |
function | Retrieve all contexts with the condition value provided. | 2 | |
context_condition:: |
function | Options form. Provide additional options for your condition. | 4 | |
context_condition:: |
function | Options form submit handler. | ||
context_condition:: |
function | Settings form. Provide variable settings for your condition. | ||
context_condition:: |
function | Clone our references when we're being cloned. | ||
context_condition:: |
function | Constructor. Do not override. |