PHP Class Sulu\Bundle\WebsiteBundle\Twig\Seo\SeoTwigExtension

Inheritance: extends Twig_Extension
显示文件 Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface $requestAnalyzer, Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathInterface $contentPath, Symfony\Component\HttpFoundation\RequestStack $requestStack )
getFunctions ( )
getName ( )
renderSeoTags ( Twig_Environment $twig, array $seoExtension, array $content, array $urls, $shadowBaseLocale ) Renders the correct title of the current page. The correct title is either the title provided by the SEO extension, or the title of the content, if the SEO extension does not provide one.

Method Details

__construct() public method

public __construct ( Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface $requestAnalyzer, Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathInterface $contentPath, Symfony\Component\HttpFoundation\RequestStack $requestStack )
$requestAnalyzer Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface
$contentPath Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathInterface
$requestStack Symfony\Component\HttpFoundation\RequestStack

getFunctions() public method

public getFunctions ( )

getName() public method

public getName ( )

renderSeoTags() public method

Renders the correct title of the current page. The correct title is either the title provided by the SEO extension, or the title of the content, if the SEO extension does not provide one.
Deprecation: use the twig include function to render the seo
public renderSeoTags ( Twig_Environment $twig, array $seoExtension, array $content, array $urls, $shadowBaseLocale )
$twig Twig_Environment
$seoExtension array
$content array
$urls array