PHP Class Elcodi\Store\CoreBundle\Services\TemplateLocator

Show file Open project: elcodi/bamboo Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Templating\EngineInterface $engine, array $bundles ) Constructs the template locator
locate ( string $templatePath ) : string Search for the template in every specified bundle

Protected Methods

Method Description
findTemplate ( string $templatePath ) : boolean | string Finds the template in all the bundles.

Method Details

__construct() public method

Constructs the template locator
public __construct ( Symfony\Component\Templating\EngineInterface $engine, array $bundles )
$engine Symfony\Component\Templating\EngineInterface Render engine
$bundles array The bundles to check (sorted).

findTemplate() protected method

Finds the template in all the bundles.
protected findTemplate ( string $templatePath ) : boolean | string
$templatePath string The template to search.
return boolean | string The string found or false if not found

locate() public method

Search for the template in every specified bundle
public locate ( string $templatePath ) : string
$templatePath string The template to find.
return string The full template name.