/** * {@inheritdoc} */ public function getUrl($path) { if ($this->isAbsoluteUrl($path)) { return $path; } $path = $this->removePrefix($path); return parent::getUrl($path); }
/** * @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)); }
public function __construct($basePath, VersionStrategy $versionStrategy) { parent::__construct($basePath, $versionStrategy); }
/** * @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; }