You are here

function views_bulk_operations_script_action_form in Views Bulk Operations (VBO) 7.3

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

File

actions/script.action.inc, line 38

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>$entity</code> and <code>$context</code> in your snippet.
                         Note that it is up to the script to save the $entity once it\'s done modifying it.'),
    '#default_value' => @$context['script'],
  );
  return $form;
}