Addon
tbladdons model class
class
Addon extends AbstractModel
Properties summary
Type | Property | Description | |
---|---|---|---|
protected | $table | ||
protected | $columnMap | ||
protected | $booleans | ||
protected | $commaSeparated | ||
protected | $casts | ||
int | $id | An addon's unique id number. | |
int[] | $packages | The packages that an addon belongs to | |
string | $name | The name of an addon | |
string | $description | The description of an addon | |
string | $billingCycle | The billing cycle of an addon | |
boolean | $applyTax | Whether or not tax should be applied to an addon. | |
boolean | $showOnOrderForm | Whether an addon will appear on order of a related product | |
int[] | $downloads | The associated downloads | |
string | $autoActivate | When provisioning of an addon should take place, either "order", "payment", "on", or "". | |
boolean | $suspendProduct | Should suspending the addon, suspend the parent product | |
int | $welcomeEmailTemplateId | The welcome email template id | |
string | $type | The type of addon for module automation (hostingaccount, reselleraccount, server, other) | |
string | $module | The module for an addon for module automation | |
int | $serverGroupId | The id number of server group an addon should be provisioned to. | |
int | $weight | The display order weighting | |
array | $autoLinkCriteria | An array of criterias for choosing products to auto-assign this addon to if allowed by admin | |
Collection|ModuleConfiguration[] | $moduleConfiguration | The module configuration for an addon. | |
Collection|Addon[] | $serviceAddons | The service addons utilising this addon. | |
Collection|CustomField[] | $customFields | The custom fields for an addon. | |
Template | $welcomeEmailTemplate | The email to send to a client when a product is ordered. | |
Collection|DynamicTranslation[] | $translatedNames | ||
Collection|DynamicTranslation[] | $translatedDescriptions |
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
static | boot() | - | |
Builder | scopeShowOnOrderForm(Builder $query) | A scope to show Addons available on OrderForm | |
HasOne | welcomeEmailTemplate() | An addon has one welcome email template. | |
string | getNameAttribute(string $name) | Get the addon name - this will override the output from the db value if set in Lang. | |
string | getDescriptionAttribute(string $name) | Get the addon description - this will override the output from the db value if set in Lang. | |
HasMany | customFields() | - | |
HasMany | serviceAddons() | - | |
HasMany | moduleConfiguration() | - | |
HasMany|DynamicTranslation[] | translatedNames() | Return the translated names for the specific addon | |
HasMany|DynamicTranslation[] | translatedDescriptions() | Return the translated names for the specific addon | |
static string | getAddonName(int $addonId, string $fallback = '', string $language = null) | Obtain the addon name for the current language, passed language or fallback to the currently defined value for the product. | |
static string | getAddonDescription(int $addonId, string $fallback = '', string $language = null) | Obtain the addon description for the current language, passed language or fallback to the currently defined value for the product. | |
string[] | pricing(array $currency) | Get available cycles and pricing for product. |
Details
static
boot ()
Builder
scopeShowOnOrderForm (Builder $query)
A scope to show Addons available on OrderForm
HasOne
welcomeEmailTemplate ()
An addon has one welcome email template.
string
getNameAttribute (string $name)
Get the addon name - this will override the output from the db value if set in Lang.
string
getDescriptionAttribute (string $name)
Get the addon description - this will override the output from the db value if set in Lang.
HasMany
customFields ()
HasMany
serviceAddons ()
HasMany
moduleConfiguration ()
HasMany|DynamicTranslation[]
translatedNames ()
Return the translated names for the specific addon
HasMany|DynamicTranslation[]
translatedDescriptions ()
Return the translated names for the specific addon
static string
getAddonName (int $addonId, string $fallback = '', string $language = null)
Obtain the addon name for the current language, passed language or fallback to the currently defined value for the product.
static string
getAddonDescription (int $addonId, string $fallback = '', string $language = null)
Obtain the addon description for the current language, passed language or fallback to the currently defined value for the product.
string[]
pricing (array $currency)
Get available cycles and pricing for product.