You are here

function views_bulk_operations_script_action_form in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 actions/script.action.inc \views_bulk_operations_script_action_form()
  2. 7.3 actions/script.action.inc \views_bulk_operations_script_action_form()

File

./script.action.inc, line 25

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.'),
    '#default_value' => @$context['script'],
  );
  return $form;
}