public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) { // By default, consider given parameters in legacy format (no mapping if route not found). $legacyController = $name; $legacyParameters = $parameters; // resolve route & legacy mapping list($legacyController, $legacyParameters) = $this->getLegacyOptions($name, $parameters); return $this->legacyContext->getAdminLink($legacyController, true, $legacyParameters); }
/** * This is a Twig port of the Smarty {$link->getAdminLink()} function. * * @param string $controller the controller name * @param bool $withToken * @param array[string] $extraParams * * @return string */ public function getAdminLink($controllerName, $withToken = true, $extraParams = array()) { return $this->context->getAdminLink($controllerName, $withToken, $extraParams); }