PHP Class WellCommerce\Bundle\ThemeBundle\Locator\ThemeLocator

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Bundle\ThemeBundle\Locator\ThemeLocatorInterface
ファイルを表示 Open project: wellcommerce/wellcommerce

Public Methods

Method Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, WellCommerce\Bundle\ThemeBundle\Context\Front\ThemeContextInterface $themeContext, string $fallbackTheme, string $themesDir ) ThemeLocator constructor.
getCurrentThemeFolder ( ) : string
getThemeFolders ( ) : array
getThemePathPattern ( ) : string
getThemesDirectory ( ) : string
locateTemplate ( string $name ) : string

Protected Methods

Method Description
locateBundlesResource ( array $bundles, array $parameters, string $name ) : string

Private Methods

Method Description
getBundleNameAndPath ( string $name ) : array
getDefaultBundleResourcePath ( Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle, string $path, array &$resourcePaths )
isValidFilename ( string $name ) : boolean
isValidPath ( string $path ) : boolean
locateThemePathForBundleResource ( Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle, array $parameters, array &$checkPaths )
scanThemesDirectory ( ) : array

Method Details

__construct() public method

ThemeLocator constructor.
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, WellCommerce\Bundle\ThemeBundle\Context\Front\ThemeContextInterface $themeContext, string $fallbackTheme, string $themesDir )
$kernel Symfony\Component\HttpKernel\KernelInterface
$themeContext WellCommerce\Bundle\ThemeBundle\Context\Front\ThemeContextInterface
$fallbackTheme string
$themesDir string

getCurrentThemeFolder() public method

public getCurrentThemeFolder ( ) : string
return string

getThemeFolders() public method

public getThemeFolders ( ) : array
return array

getThemePathPattern() public method

public getThemePathPattern ( ) : string
return string

getThemesDirectory() public method

public getThemesDirectory ( ) : string
return string

locateBundlesResource() protected method

protected locateBundlesResource ( array $bundles, array $parameters, string $name ) : string
$bundles array
$parameters array
$name string
return string

locateTemplate() public method

public locateTemplate ( string $name ) : string
$name string
return string