function contextphp_reaction_php::options_form in Context PHP 7
Same name and namespace in other branches
- 6 plugins/contextphp_reaction_php.inc \contextphp_reaction_php::options_form()
Overrides context_reaction::options_form
File
- plugins/
contextphp_reaction_php.inc, line 28 - contextphp_reaction_php.inc Adds php reaction to Context
Class
- contextphp_reaction_php
- PHP code as a Context reaction.
Code
function options_form($context) {
$defaults = $this
->fetch_from_context($context, 'options');
return array(
'phpcode' => array(
'#type' => 'textarea',
'#title' => t('PHP code'),
'#description' => t('Enter PHP code that will react on the given condition. Do not use <?php ?>.'),
'#default_value' => isset($defaults['phpcode']) ? $defaults['phpcode'] : '',
),
);
}