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 230  
Class
- HookAlterOrderTest
 - Tests Hook Alter Order.
 
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.