Addon
Traits
Constants
| PROVISIONING_TYPE_FEATURE | 
 | 
| PROVISIONING_TYPE_STANDARD | 
 | 
Properties summary
| Type | Property | Description | |
|---|---|---|---|
| protected | $table | ||
| protected | $moduleField | ||
| protected | $columnMap | ||
| protected | $booleans | ||
| protected | $commaSeparated | ||
| protected | $casts | ||
| protected | $pricingCache | ||
| protected | $appends | 
Methods summary
| Return Type | Method Name | Description | |
|---|---|---|---|
| static | boot() | - | |
| Builder | scopeShowOnOrderForm(Builder $query) | A scope to show Addons available on OrderForm | |
| Builder | scopeIsHidden(Builder $query) | A scope to show Addons hidden on OrderForm | |
| Builder | scopeIsNotHidden(Builder $query) | A scope to show Addons not hidden on OrderForm | |
| Builder | scopeIsRetired(Builder $query) | A scope to show Addons that should not be displayed on OrderForm | |
| Builder | scopeIsNotRetired(Builder $query) | A scope to show Addons that may be displayed on OrderForm | |
| Builder | scopeAvailableOnOrderForm(Builder $query, array $addons = []) | A scope to show Addons available on OrderForm using hidden and show on order options. | |
| Builder | scopeSorted($query) | Sort by display order. | |
| 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 $description) | Get the addon description - this will override the output from the db value if set in Lang. | |
| HasMany | customFields() | - | |
| HasMany | serviceAddons() | - | |
| HasMany | dbPricing() | - | |
| 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. | |
| Pricing | pricing(array|null $currency = null) | Get available cycles and pricing for addon. | |
| bool | isFree() | Is product a free product. | |
| bool | isOneTime() | Is product a one time product. | |
| Builder | scopeMarketConnect(Builder $query) | Quick filter for module = marketconnect. | |
| string | getProductKeyAttribute(string $value) | Get product key attribute for the current product addon entity. | |
| bool | isMarketConnectAddon() | Is this a MarketConnect addon? | |
| string | getServiceKeyAttribute(string $value) | Get service key attribute for the current product addon entity. | |
| bool | isValidForUpgrade(Addon $addon) | Validate a given addon is a valid upgrade candidate. | |
| bool | isVisibleOnOrderForm(array $addonIds = []) | Check if the addon should be visible on the orderform. | |
| static array | getAddonDropdownValues(int $currentAddonId) | Get an array of id => name addons that should appear in an addon dropdown. | |
| emailMarketerRules() | - | ||
| array | getAvailableBillingCycles() | Get available billing cycles for product. | |
| Addon | duplicate(string $newAddonName) | Replicate Product Addon and Pricing. New object uses provided string as name. | |
| string | getProvisioningTypeAttribute() | - | |
| string | getOrderLineItemProductGroupName() | - | |
| HasOne | overrideOnDemandRenewal() | On-demand renewal override settings if not null | |
| Addon | overridingOnDemandRenewal(bool $enable, int $monthly, int $quarterly, int $semiannually, int $annually, int $biennially, int $triennially) | Override on-demand renewal settings | 
Details
                static            
    boot ()
        
    
    
                            Builder
    scopeShowOnOrderForm (Builder $query)
        
    
    A scope to show Addons available on OrderForm
                            Builder
    scopeIsHidden (Builder $query)
        
    
    A scope to show Addons hidden on OrderForm
                            Builder
    scopeIsNotHidden (Builder $query)
        
    
    A scope to show Addons not hidden on OrderForm
                            Builder
    scopeIsRetired (Builder $query)
        
    
    A scope to show Addons that should not be displayed on OrderForm
                            Builder
    scopeIsNotRetired (Builder $query)
        
    
    A scope to show Addons that may be displayed on OrderForm
                            Builder
    scopeAvailableOnOrderForm (Builder $query, array $addons = [])
        
    
    A scope to show Addons available on OrderForm using hidden and show on order options.
                            Builder
    scopeSorted ($query)
        
    
    Sort by display order.
                            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 $description)
        
    
    Get the addon description - this will override the output from the db value if set in Lang.
                            HasMany
    customFields ()
        
    
    
                            HasMany
    serviceAddons ()
        
    
    
                            HasMany
    dbPricing ()
        
    
    
                            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.
                            Pricing
    pricing (array|null $currency = null)
        
    
    Get available cycles and pricing for addon.
                            bool
    isFree ()
        
    
    Is product a free product.
                            bool
    isOneTime ()
        
    
    Is product a one time product.
                            Builder
    scopeMarketConnect (Builder $query)
        
    
    Quick filter for module = marketconnect.
                            string
    getProductKeyAttribute (string $value)
        
    
    Get product key attribute for the current product addon entity.
                            bool
    isMarketConnectAddon ()
        
    
    Is this a MarketConnect addon?
                            string
    getServiceKeyAttribute (string $value)
        
    
    Get service key attribute for the current product addon entity.
                            bool
    isValidForUpgrade (Addon $addon)
        
    
    Validate a given addon is a valid upgrade candidate.
For MarketConnect, validates upgrade product service key matches current product key.
                            bool
    isVisibleOnOrderForm (array $addonIds = [])
        
    
    Check if the addon should be visible on the orderform.
                static            array
    getAddonDropdownValues (int $currentAddonId)
        
    
    Get an array of id => name addons that should appear in an addon dropdown.
                            
    emailMarketerRules ()
        
    
    
                            array
    getAvailableBillingCycles ()
        
    
    Get available billing cycles for product.
                            Addon
    duplicate (string $newAddonName)
        
    
    Replicate Product Addon and Pricing. New object uses provided string as name.
                            string
    getProvisioningTypeAttribute ()
        
    
    
                            string
    getOrderLineItemProductGroupName ()
        
    
    
                            HasOne
    overrideOnDemandRenewal ()
        
    
    On-demand renewal override settings if not null
                            Addon
    overridingOnDemandRenewal (bool $enable, int $monthly, int $quarterly, int $semiannually, int $annually, int $biennially, int $triennially)
        
    
    Override on-demand renewal settings