1 common_test.module common_test_backdrop_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL)

Implements hook_TYPE_alter().

File

core/modules/simpletest/tests/common_test.module, line 162
Helper module for the Common tests.

Code

function common_test_backdrop_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) {
  // Alter first argument.
  if (is_array($data)) {
    $data['foo'] = 'Backdrop';
  }
  elseif (is_object($data)) {
    $data->foo = 'Backdrop';
  }
  // Alter second argument, if present.
  if (isset($arg2)) {
    if (is_array($arg2)) {
      $arg2['foo'] = 'Backdrop';
    }
    elseif (is_object($arg2)) {
      $arg2->foo = 'Backdrop';
    }
  }
  // Try to alter third argument, if present.
  if (isset($arg3)) {
    if (is_array($arg3)) {
      $arg3['foo'] = 'Backdrop';
    }
    elseif (is_object($arg3)) {
      $arg3->foo = 'Backdrop';
    }
  }
}