Adventure Documentation

Collection extends FunctionPlugin
in package
Uses WithMemoryCache

Calls the `makeCollection` method on the provided controller and returns the collection.

Arguments:

primary => bool

secondary => bool

controller => string

options => array

Example:

{collection primary=true controller="product" options=$options}

Tags

Table of Contents

callback()  : mixed
get()  : false|mixed|null
Returns a collection from cache, or caches and returns the collection if not available
getName()  : string

Methods

callback()

public callback(array<string|int, mixed> $args, Smarty_Internal_Template $template) : mixed
Parameters
$args : array<string|int, mixed>
$template : Smarty_Internal_Template
Tags
inheritDoc
throws
InvalidArgumentException
Return values
mixed

get()

Returns a collection from cache, or caches and returns the collection if not available

public static get(object|string $controller, bool $priority, array<string|int, mixed> $args) : false|mixed|null
Parameters
$controller : object|string

the controller or the name of the controller class

$priority : bool
$args : array<string|int, mixed>
Tags
throws
InvalidArgumentException
Return values
false|mixed|null

getName()

public getName() : string
Tags
inheritDoc
Return values
string

        

Search results