diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php index f83f421490..4f36d94609 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php @@ -256,6 +256,8 @@ public function invokeAll($hook, array $args = []); * * @return mixed * The return value of the hook implementation. + * + * @see \Drupal\Core\Extension\ModuleHandlerInterface::invoke() */ public function invokeDeprecated($module, $hook, array $args = []); @@ -278,6 +280,8 @@ public function invokeDeprecated($module, $hook, array $args = []); * arrays from their implementations, those are merged into one array * recursively. Note: integer keys in arrays will be lost, as the merge is * done using array_merge_recursive(). + * + * @see \Drupal\Core\Extension\ModuleHandlerInterface::invokeAll() */ public function invokeAllDeprecated($hook, array $args = []); @@ -338,31 +342,7 @@ public function alter($type, &$data, &$context1 = NULL, &$context2 = NULL); * This method triggers an E_USER_DEPRECATED error if any implementations of * the alter hook are found. It is otherwise identical to alter(). * - * This dispatch function hands off the passed-in variables to type-specific - * hook_TYPE_alter() implementations in modules. It ensures a consistent - * interface for all altering operations. - * - * A maximum of 2 alterable arguments is supported. In case more arguments need - * to be passed and alterable, modules provide additional variables assigned by - * reference in the last $context argument: - * @code - * $context = array( - * 'alterable' => &$alterable, - * 'unalterable' => $unalterable, - * 'foo' => 'bar', - * ); - * $this->alter('mymodule_data', $alterable1, $alterable2, $context); - * @endcode - * - * Note that objects are always passed by reference in PHP5. If it is absolutely - * required that no implementation alters a passed object in $context, then an - * object needs to be cloned: - * @code - * $context = array( - * 'unalterable_object' => clone $object, - * ); - * $this->alter('mymodule_data', $data, $context); - * @endcode + * See the documentation for alter() for more details. * * @param string|array $type * A string describing the type of the alterable $data. 'form', 'links', @@ -383,6 +363,8 @@ public function alter($type, &$data, &$context1 = NULL, &$context2 = NULL); * (optional) An additional variable that is passed by reference. If more * context needs to be provided to implementations, then this should be an * associative array as described above. + * + * @see \Drupal\Core\Extension\ModuleHandlerInterface::alter() */ public function alterDeprecated($type, &$data, &$context1 = NULL, &$context2 = NULL);