Class craft\services\Et
- Inheritance
- craft\services\Et » yii\base\Component » yii\base\BaseObject
- Implements
- yii\base\Configurable
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/services/Et.php
ET service.
An instance of the ET service is globally accessible in Craft via Craft::$app->et
.
Property | Type | Description | Defined By |
---|---|---|---|
$elliottBaseUrl |
string | The host name to send Elliott requests to. | craft\services\Et |
$elliottQuery |
string, null | Query string to append to Elliott request URLs. | craft\services\Et |
Method | Description | Defined By |
---|---|---|
__call() |
Calls the named method which is not a class method. | yii\base\BaseObject |
__clone() |
This method is called after the object is created by cloning an existing one. | yii\base\Component |
__construct() |
Constructor. | yii\base\BaseObject |
__get() |
Returns the value of an object property. | yii\base\BaseObject |
__isset() |
Checks if a property is set, i.e. defined and not null. | yii\base\BaseObject |
__set() |
Sets value of an object property. | yii\base\BaseObject |
__unset() |
Sets an object property to null. | yii\base\BaseObject |
attachBehavior() |
Attaches a behavior to this component. | yii\base\Component |
attachBehaviors() |
Attaches a list of behaviors to the component. | yii\base\Component |
behaviors() |
Returns a list of behaviors that this component should behave as. | yii\base\Component |
canGetProperty() |
Returns a value indicating whether a property can be read. | yii\base\BaseObject |
canSetProperty() |
Returns a value indicating whether a property can be set. | yii\base\BaseObject |
className() |
Returns the fully qualified name of this class. | yii\base\BaseObject |
decodeEtModel() |
Creates a new EtModel with provided JSON, and returns it if it's valid. | craft\services\Et |
detachBehavior() |
Detaches a behavior from the component. | yii\base\Component |
detachBehaviors() |
Detaches all behaviors from the component. | yii\base\Component |
ensureBehaviors() |
Makes sure that the behaviors declared in behaviors() are attached to this component. | yii\base\Component |
fetchCouponPrice() |
Fetches the price of an upgrade with a coupon applied to it. | craft\services\Et |
fetchUpgradeInfo() |
Fetches info about the available Craft editions from Elliott. | craft\services\Et |
getBehavior() |
Returns the named behavior object. | yii\base\Component |
getBehaviors() |
Returns all behaviors attached to this component. | yii\base\Component |
hasEventHandlers() |
Returns a value indicating whether there is any handler attached to the named event. | yii\base\Component |
hasMethod() |
Returns a value indicating whether a method is defined. | yii\base\BaseObject |
hasProperty() |
Returns a value indicating whether a property is defined. | yii\base\BaseObject |
init() |
Initializes the object. | yii\base\BaseObject |
off() |
Detaches an existing event handler from this component. | yii\base\Component |
on() |
Attaches an event handler to an event. | yii\base\Component |
purchaseUpgrade() |
Attempts to purchase an edition upgrade. | craft\services\Et |
trigger() |
Triggers an event. | yii\base\Component |
Constant | Value | Description | Defined By |
---|---|---|---|
ENDPOINT_GET_COUPON_PRICE |
'app/getCouponPrice' | craft\services\Et | |
ENDPOINT_GET_UPGRADE_INFO |
'app/getUpgradeInfo' | craft\services\Et | |
ENDPOINT_PURCHASE_UPGRADE |
'app/purchaseUpgrade' | craft\services\Et |
Property Details
$elliottBaseUrl
public property
#
The host name to send Elliott requests to.
public string $elliottBaseUrl = 'https://elliott.craftcms.com'
$elliottQuery
public property
#
Query string to append to Elliott request URLs.
public string, null $elliottQuery = null
Method Details
decodeEtModel()
public method
#
Creates a new EtModel with provided JSON, and returns it if it's valid.
public craft\models\Et, null decodeEtModel ( \craft\services\string $attributes )
$attributes |
string |
fetchCouponPrice()
public method
#
Fetches the price of an upgrade with a coupon applied to it.
public craft\models\Et, null fetchCouponPrice ( \craft\services\int $edition, \craft\services\string $couponCode )
$edition |
integer | |
$couponCode |
string |
fetchUpgradeInfo()
public method
#
Fetches info about the available Craft editions from Elliott.
public craft\models\Et, null fetchUpgradeInfo ( )
purchaseUpgrade()
public method
#
Attempts to purchase an edition upgrade.
public boolean purchaseUpgrade ( craft\models\UpgradePurchase $model )
$model |
craft\models\UpgradePurchase |