function devel_execute_form in Devel 7
Same name and namespace in other branches
- 5 devel.module \devel_execute_form()
- 6 devel.module \devel_execute_form()
Generates the execute form.
1 call to devel_execute_form()
- devel_execute_block_form in ./
devel.module - Generates the execute block form.
1 string reference to 'devel_execute_form'
- devel_menu in ./
devel.module - Implements hook_menu().
File
- ./
devel.module, line 1432 - This module holds functions useful for Drupal development.
Code
function devel_execute_form() {
$form['execute']['code'] = array(
'#type' => 'textarea',
'#title' => t('PHP code to execute'),
'#description' => t('Enter some code. Do not use <code><?php ?></code> tags.'),
'#default_value' => isset($_SESSION['devel_execute_code']) ? $_SESSION['devel_execute_code'] : '',
'#rows' => 20,
'#attributes' => array(
'spellcheck' => 'false',
),
);
$form['execute']['actions'] = array(
'#type' => 'actions',
);
$form['execute']['actions']['op'] = array(
'#type' => 'submit',
'#value' => t('Execute'),
);
$form['#attached']['css'][] = drupal_get_path('module', 'devel') . '/devel.css';
$form['#redirect'] = FALSE;
if (isset($_SESSION['devel_execute_code'])) {
unset($_SESSION['devel_execute_code']);
}
return $form;
}