src/Webtrees/Hook/Hook.php
public function executeOnlyFor(array $module_names) {
	    $result = array();
	    if(HookProvider::getInstance()->isModuleOperational()){
	       $params = func_get_args();
	       array_shift($params);
    	    foreach ($module_names as $module_name) {
    	        if($module = Module::getModuleByName($module_name)) {
    	            $result[] = call_user_func_array(array($module, $this->hook_function), $params);
    	        }
    	    }
	    }
	    return $result;
	}
public function executeOnlyFor(array $module_names) {
	    $result = array();
	    if(HookProvider::getInstance()->isModuleOperational()){
	       $params = func_get_args();
	       array_shift($params);
    	    foreach ($module_names as $module_name) {
    	        if($module = Module::getModuleByName($module_name)) {
    	            $result[] = call_user_func_array(array($module, $this->hook_function), $params);
    	        }
    	    }
	    }
	    return $result;
	}
public function executeOnlyFor ( array $ module_names ) { $ result = array ( ) ; if ( HookProvider :: getInstance ( ) -> isModuleOperational ( ) ) { $ params = func_get_args ( ) ; array_shift ( $ params ) ; foreach ( $ module_names as $ module_name ) { if ( $ module = Module :: getModuleByName ( $ module_name ) ) { $ result [ ] = call_user_func_array ( array ( $ module , $ this -> hook_function ) , $ params ) ; } } } return $ result ; }
Return the resuls of the execution of the hook function for a defined list of modules, only for those enabled.

@param string[] $module_names List of Modules to execute
@return array Results of the hook executions
Return the resuls of the execution of the hook function for a defined list of modules only for those enabled .