Commit 09d4cc93 authored by webchick's avatar webchick

Issue #2170991 by Xano: Migrate provides invalid arguments when invoking...

Issue #2170991 by Xano: Migrate provides invalid arguments when invoking hooks/type hint array arguments in ModuleHandlerInterface.
parent eacd8a50
......@@ -264,7 +264,7 @@ public function implementsHook($module, $hook) {
/**
* Implements \Drupal\Core\Extension\ModuleHandlerInterface::invoke().
*/
public function invoke($module, $hook, $args = array()) {
public function invoke($module, $hook, array $args = array()) {
if (!$this->implementsHook($module, $hook)) {
return;
}
......@@ -275,7 +275,7 @@ public function invoke($module, $hook, $args = array()) {
/**
* Implements \Drupal\Core\Extension\ModuleHandlerInterface::invokeAll().
*/
public function invokeAll($hook, $args = array()) {
public function invokeAll($hook, array $args = array()) {
$return = array();
$implementations = $this->getImplementations($hook);
foreach ($implementations as $module) {
......
......@@ -185,7 +185,7 @@ public function implementsHook($module, $hook);
* @return mixed
* The return value of the hook implementation.
*/
public function invoke($module, $hook, $args = array());
public function invoke($module, $hook, array $args = array());
/**
* Invokes a hook in all enabled modules that implement it.
......@@ -199,7 +199,7 @@ public function invoke($module, $hook, $args = array());
* An array of return values of the hook implementations. If modules return
* arrays from their implementations, those are merged into one array.
*/
public function invokeAll($hook, $args = array());
public function invokeAll($hook, array $args = array());
/**
* Passes alterable variables to specific hook_TYPE_alter() implementations.
......
......@@ -46,8 +46,8 @@ protected function getModuleHandler() {
* {@inheritdoc}
*/
public function prepareRow(Row $row) {
$this->getModuleHandler()->invokeAll('migrate_prepare_row', $row, $this, $this->migration);
$this->getModuleHandler()->invokeAll('migrate_ '. $this->migration->id() . '_prepare_row', $row, $this, $this->migration);
$this->getModuleHandler()->invokeAll('migrate_prepare_row', array($row, $this, $this->migration));
$this->getModuleHandler()->invokeAll('migrate_ '. $this->migration->id() . '_prepare_row', array($row, $this, $this->migration));
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment