CraftVariableBehavior

Type
Class
Namespace
craft\commerce\web\twig
Inherits
craft\commerce\web\twig\CraftVariableBehavior » yii\base\Behavior » yii\base\BaseObject
Implements
yii\base\Configurable
Since
2.0

Class CraftVariableBehavior

View source

Public Properties

PropertyDescription
$commercecraft\commerce\Plugin
$owneryii\base\Component, null – The owner of this behavior

$commerce

Signature

public craft\commerce\Plugin $commerce = null

Public Methods

MethodDescription
__call()Calls the named method which is not a class method.
__construct()Constructor.
__get()Returns the value of an object property.
__isset()Checks if a property is set, i.e. defined and not null.
__set()Sets value of an object property.
__unset()Sets an object property to null.
attach()Attaches the behavior object to the component.
canGetProperty()Returns a value indicating whether a property can be read.
canSetProperty()Returns a value indicating whether a property can be set.
className()Returns the fully qualified name of this class.
detach()Detaches the behavior object from the component.
events()Declares event handlers for the $owner's events.
hasMethod()Returns a value indicating whether a method is defined.
hasProperty()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()

Signature

public void init ( )

orders()

Returns a new OrderQuery instance.

View source

Arguments

  • $criteria (mixed)

Returns

craft\commerce\elements\db\OrderQuery

Signature

public craft\commerce\elements\db\OrderQuery orders ( $criteria = null )

products()

Returns a new ProductQuery instance.

View source

Arguments

  • $criteria (mixed)

Returns

craft\commerce\elements\db\ProductQuery

Signature

public craft\commerce\elements\db\ProductQuery products ( $criteria = null )

subscriptions()

Returns a new SubscriptionQuery instance.

View source

Arguments

  • $criteria (mixed)

Returns

craft\commerce\elements\db\SubscriptionQuery

Signature

public craft\commerce\elements\db\SubscriptionQuery subscriptions ( $criteria = null )

variants()

Returns a new VariantQuery instance.

View source

Arguments

  • $criteria (mixed)

Returns

craft\commerce\elements\db\VariantQuery

Signature

public craft\commerce\elements\db\VariantQuery variants ( $criteria = null )