Merx

new ListItem()

Create a new ListItem

new ListItem(string $key, null|string $title = null, Kirby\Cms\Page|string|null $page = null, Wagnerwagner\Merx\Price|float|null $price = null, float $quantity = 1, null|float $quantifier = null, null|string $type = 'product', null|array $data = null, bool $refreshPrice = true)

Parameters

Name Type Default
$key string -
$title null or string null
$page Kirby\Cms\Page or string or null null
$price Price or float or null null
$quantity float 1
$quantifier null or float null
$type null or string 'product'
$data null or array null
$refreshPrice bool true

Exceptions

Type Description
InvalidArgumentException when $type is not in ListItem::$allowedTypes.

Parent class

Wagnerwagner\Merx\ListItem