Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
* This file is part of the Symfony CMF package.
|
||||
*
|
||||
* (c) 2011-2014 Symfony CMF
|
||||
* (c) 2011-2015 Symfony CMF
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@ -15,11 +15,10 @@ use Symfony\Component\Routing\Generator\UrlGenerator;
|
|||
use Symfony\Component\Routing\Route as SymfonyRoute;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* A Generator that uses a RouteProvider rather than a RouteCollection
|
||||
* A Generator that uses a RouteProvider rather than a RouteCollection.
|
||||
*
|
||||
* @author Larry Garfield
|
||||
*/
|
||||
|
@ -44,13 +43,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function generate($name, $parameters = array(), $absolute = false)
|
||||
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
|
||||
{
|
||||
if ($name instanceof SymfonyRoute) {
|
||||
$route = $name;
|
||||
} elseif (null === $route = $this->provider->getRouteByName($name, $parameters)) {
|
||||
} elseif (null === $route = $this->provider->getRouteByName($name)) {
|
||||
throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
|
||||
}
|
||||
|
||||
|
@ -60,13 +59,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
|
|||
|
||||
$debug_message = $this->getRouteDebugMessage($name);
|
||||
|
||||
return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $absolute, $hostTokens);
|
||||
return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $referenceType, $hostTokens);
|
||||
}
|
||||
|
||||
/**
|
||||
* Support a route object and any string as route name
|
||||
* Support a route object and any string as route name.
|
||||
*
|
||||
* {@inheritDoc}
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports($name)
|
||||
{
|
||||
|
@ -74,7 +73,7 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
|
|||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getRouteDebugMessage($name, array $parameters = array())
|
||||
{
|
||||
|
@ -87,14 +86,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI
|
|||
}
|
||||
|
||||
if ($name instanceof RouteObjectInterface) {
|
||||
return 'Route with key ' . $name->getRouteKey();
|
||||
return 'Route with key '.$name->getRouteKey();
|
||||
}
|
||||
|
||||
if ($name instanceof SymfonyRoute) {
|
||||
return 'Route with pattern ' . $name->getPattern();
|
||||
return 'Route with path '.$name->getPath();
|
||||
}
|
||||
|
||||
return get_class($name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue