This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

field Twig function

Defined in /modules/core/classes/core_twigextension.php, lines 94-97
Author LemonStand eCommerce Inc.
mixed function field(mixed $object, string $field_name)
$object mixed object to load the field value from.
$field_name string specifies the field name.
{return} mixed the function returns the object field value.
Returns an object's field value. Use this function to access virtual object fields, which cannot be accessed directly by Twig engine. If you are sure that an object property does exist, but Twig reports that the method doesn't exist, use this function. The following example outputs the current customer name.
{{ field(this.customer, 'name') }}