function views_bulk_operations_script_action_form in Views Bulk Operations (VBO) 6
Same name and namespace in other branches
- 6.3 script.action.inc \views_bulk_operations_script_action_form()
- 7.3 actions/script.action.inc \views_bulk_operations_script_action_form()
File
- actions/
script.action.inc, line 37
Code
function views_bulk_operations_script_action_form($context) {
$form['script'] = array(
'#type' => 'textarea',
'#title' => t('PHP script'),
'#description' => t('Type the PHP snippet that will run upon execution of this action. You can use variables <code>&$object</code> and <code>$context</code> in your snippet.
Note that it is up to the script to save the object once it\'s done modifying it. Do NOT enclose the script within a <?php> tag.'),
'#default_value' => @$context['script'],
);
return $form;
}