1. When calling the methods of other extensions or classes in the controller, the getCurrentUrl() method is the route obtained from the [method under the current controller], not the route of [other extensions or class methods]! ! !
2. The getCurrentUrl() method code:
/** * get the current url * @return string */ public static function getCurrentUrl() { $pageURL = 'http'; if (@$_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $ pageURL . = ": //" ; $ pageURL . = $ _SERVER ['HTTP_HOST']. $ _SERVER ['REQUEST_URI' ]; return $ pageURL ; }