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

instance_of Twig test

Defined in /modules/core/classes/core_twigextension.php, lines 247-247
Author LemonStand eCommerce Inc.
boolean function instance_of(mixed $obj, string $class_name)
$obj mixed specifies the object to test.
$class_name string specifies the class name to test the object against.
{return} boolean returns TRUE if the specified object is instance of the specified class name. Returns FALSE otherwise.
Tests whether an object is instance of a specific class. This is an equivalent of PHP instance_of operator. Usage example:
{% set products = products is instance_of('Shop_Product')  ? products.find_all() : products %}