Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getUrl($path)
 {
     if ($this->isAbsoluteUrl($path)) {
         return $path;
     }
     $path = $this->removePrefix($path);
     return parent::getUrl($path);
 }
Пример #2
0
 /**
  * @dataProvider getContextConfigs
  */
 public function testGetUrlWithContext($basePathRequest, $basePath, $format, $path, $expected)
 {
     $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format), $this->getContext($basePathRequest));
     $this->assertEquals($expected, $package->getUrl($path));
 }
Пример #3
0
 public function __construct($basePath, VersionStrategy $versionStrategy)
 {
     parent::__construct($basePath, $versionStrategy);
 }
Пример #4
0
 /**
  * @param string $basePath
  * @param VersionStrategyInterface $versionStrategy
  * @param ThemeContextInterface $themeContext
  * @param PathResolverInterface $pathResolver
  * @param ContextInterface|null $context
  */
 public function __construct($basePath, VersionStrategyInterface $versionStrategy, ThemeContextInterface $themeContext, PathResolverInterface $pathResolver, ContextInterface $context = null)
 {
     parent::__construct($basePath, $versionStrategy, $context);
     $this->themeContext = $themeContext;
     $this->pathResolver = $pathResolver;
 }