CraftVariableBehavior

Type
Class
Namespace
craft\commerce\web\twig
Inherits
craft\commerce\web\twig\CraftVariableBehavior » yii\base\Behavior (opens new window) » yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Since
2.0

Class CraftVariableBehavior

View source (opens new window)

# Public Properties

# commerce

Type
craft\commerce\Plugin
Default value
null

View source (opens new window)

# Public Methods

Method Description
__call() (opens new window) Calls the named method which is not a class method.
__construct() (opens new window) Constructor.
__get() (opens new window) Returns the value of an object property.
__isset() (opens new window) Checks if a property is set, i.e. defined and not null.
__set() (opens new window) Sets value of an object property.
__unset() (opens new window) Sets an object property to null.
attach() (opens new window) Attaches the behavior object to the component.
canGetProperty() (opens new window) Returns a value indicating whether a property can be read.
canSetProperty() (opens new window) Returns a value indicating whether a property can be set.
className() (opens new window) Returns the fully qualified name of this class.
detach() (opens new window) Detaches the behavior object from the component.
events() (opens new window) Declares event handlers for the owner (opens new window)'s events.
hasMethod() (opens new window) Returns a value indicating whether a method is defined.
hasProperty() (opens new window) Returns a value indicating whether a property is defined.
init()
orders() Returns a new OrderQuery instance.
products() Returns a new ProductQuery instance.
subscriptions() Returns a new SubscriptionQuery instance.
variants() Returns a new VariantQuery instance.

# init()

View source (opens new window)

# orders()

Returns a new OrderQuery instance.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\db\OrderQuery

# products()

Returns a new ProductQuery instance.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\db\ProductQuery

# subscriptions()

Returns a new SubscriptionQuery instance.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\db\SubscriptionQuery

# variants()

Returns a new VariantQuery instance.

View source (opens new window)

Arguments

Returns

craft\commerce\elements\db\VariantQuery