function drupal_alter

Passes alterable variables to specific hook_TYPE_alter() implementations.

Deprecated

as of Drupal 8.0. Use Drupal::moduleHandler()->alter($hook).

See also

\Drupal\Core\Extension\ModuleHandler::alter()

73 calls to drupal_alter()
AjaxResponse::ajaxRender in drupal/core/lib/Drupal/Core/Ajax/AjaxResponse.php
Prepares the AJAX commands for sending back to the client.
ajax_render in drupal/core/includes/ajax.inc
Renders a commands array into JSON.
AlterDecorator::getDefinitions in drupal/core/lib/Drupal/Core/Plugin/Discovery/AlterDecorator.php
Implements Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().
AlterTest::testDrupalAlter in drupal/core/modules/system/lib/Drupal/system/Tests/Common/AlterTest.php
Tests if the theme has been altered.
batch_process in drupal/core/includes/form.inc
Processes the batch.

... See full list

1 string reference to 'drupal_alter'
drupal_theme_initialize in drupal/core/includes/theme.inc
Initializes the theme system by loading the theme.

File

drupal/core/includes/bootstrap.inc, line 2230
Functions that need to be loaded on every Drupal request.

Code

function drupal_alter($type, &$data, &$context1 = NULL, &$context2 = NULL) {
  return Drupal::moduleHandler()
    ->alter($type, $data, $context1, $context2);
}