class FetchTag extends Twig_TokenParser

Defines the 'fetch' template tag that provides backward compatibility with Gryphon-based templates. Objects returned will be wrapped in object compatibility wrappers.

Example:

{% fetch foo as article with [
 'limit': 1,
 'order': 'created desc',
 'where': 'status = 1'
] %}

// find articles with BOTH tags
{% fetch foo as article with [
 'limit': 12,
 'order': 'created desc',
 'where': 'status = 1'
 'withTags': ['frontpage', 'sports']
] %}

// find articles with EITHER tags
{% fetch foo as article with [
 'limit': 12,
 'order': 'created desc',
 'where': 'status = 1'
 'withTags': ['frontpage|sports']
] %}

Methods

getTag()

No description

parse(Twig_Token $tok)

No description

Details

at line 37
getTag()

at line 42
parse(Twig_Token $tok)

Parameters

Twig_Token $tok