function HookAlterOrderTest::alter
Invokes ModuleHandler->alter() and returns the altered array.
Parameters
string|list<string> $type: Alter type or list of alter types.
Return value
array The altered array.
1 call to HookAlterOrderTest::alter()
- HookAlterOrderTest::assertAlterCallOrder in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php - Asserts the call order from an alter call.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php, line 225
Class
- HookAlterOrderTest
- @group Hook @group legacy
Namespace
Drupal\KernelTests\Core\HookCode
protected function alter(string|array $type) : array {
$data = [];
\Drupal::moduleHandler()->alter($type, $data);
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.