class MergeFunction extends BaseFunction

Merge two or more result sets.

NOTE that this only works on CEO result sets and will not function on compatibility models.

Methods

__construct()

No description

getFunctionOptions()

No description

getDI()

No description

string
getFunctionName()

Return function name

mixed
handle($mergable, $key, $direction = -1)

Fetch some dehydrated data.

Details

in BaseFunction at line 9
__construct()

in BaseFunction at line 18
getFunctionOptions()

in BaseFunction at line 23
getDI()

at line 17
string getFunctionName()

Return function name

Return Value

string

at line 50
mixed handle($mergable, $key, $direction = -1)

Fetch some dehydrated data.

{%
    set hp = fetch('article')
                .wherePublished()
                .limit(10)
                .findByTags(['homepage'])
%}
{%
    set sports = fetch('article')
                .wherePublished()
                .limit(10)
                .findByTags(['sports'])
%}
{% set items = merge([hp, sports], 'published_at') %}
{% for item in items %}
    {{ macros.rssItem(item) }}
{% endfor %}

Parameters

$mergable
$key
$direction

Return Value

mixed