protected function doGenerate(array
$variables, array
$defaults, array
$tokens, array
$parameters, array &
$query_params,
$name) { $variables =
array_flip($variables);
$mergedParams =
array_replace($defaults,
$this->context->
getParameters(),
$parameters);
// all params must be given
if ($diff =
array_diff_key($variables,
$mergedParams)) { throw new MissingMandatoryParametersException($name,
array_keys($diff));
} $url = '';
// Tokens start from the end of the path and work to the beginning. The
// first one or several variable tokens may be optional, but once we find a
// supplied token or a static text portion of the path, all remaining
// variables up to the start of the path must be supplied to there is no gap.
$optional = TRUE;
// Structure of $tokens from the compiled route:
// If the path is /admin/config/user-interface/shortcut/manage/{shortcut_set}/add-link-inline
// [ [ 0 => 'text', 1 => '/add-link-inline' ], [ 0 => 'variable', 1 => '/', 2 => '[^/]++', 3 => 'shortcut_set' ], [ 0 => 'text', 1 => '/admin/config/user-interface/shortcut/manage' ] ]