PHP Class Sulu\Bundle\TagBundle\Twig\TagTwigExtension

Inheritance: extends Twig_Extension
Datei anzeigen Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Component\Tag\Request\TagRequestHandlerInterface $tagRequestHandler, JMS\Serializer\SerializerInterface $serializer, Sulu\Component\Cache\MemoizeInterface $memoizeCache )
appendTagUrlFunction ( array $tag, string $tagsParameter = 'tags' ) : string Extends current URL with given tag.
clearTagUrlFunction ( string $tagsParameter = 'tags' ) : string Remove tag from current URL.
getFunctions ( )
getName ( )
getTagsFunction ( ) : array
setTagUrlFunction ( array $tag, string $tagsParameter = 'tags' ) : string Set tag to current URL.

Method Details

__construct() public method

public __construct ( Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Component\Tag\Request\TagRequestHandlerInterface $tagRequestHandler, JMS\Serializer\SerializerInterface $serializer, Sulu\Component\Cache\MemoizeInterface $memoizeCache )
$tagManager Sulu\Bundle\TagBundle\Tag\TagManagerInterface
$tagRequestHandler Sulu\Component\Tag\Request\TagRequestHandlerInterface
$serializer JMS\Serializer\SerializerInterface
$memoizeCache Sulu\Component\Cache\MemoizeInterface

appendTagUrlFunction() public method

Extends current URL with given tag.
public appendTagUrlFunction ( array $tag, string $tagsParameter = 'tags' ) : string
$tag array will be included in the URL
$tagsParameter string GET parameter name
return string

clearTagUrlFunction() public method

Remove tag from current URL.
public clearTagUrlFunction ( string $tagsParameter = 'tags' ) : string
$tagsParameter string GET parameter name
return string

getFunctions() public method

public getFunctions ( )

getName() public method

public getName ( )

getTagsFunction() public method

public getTagsFunction ( ) : array
return array

setTagUrlFunction() public method

Set tag to current URL.
public setTagUrlFunction ( array $tag, string $tagsParameter = 'tags' ) : string
$tag array will be included in the URL
$tagsParameter string GET parameter name
return string