Blesta Source Documentation

Upgrade5_13_0B1 extends UpgradeUtil

Upgrades to version 5.13.0-b1

Table of Contents

Properties

$tasks

Methods

__construct() Setup
addConfig() Adds a config setting to the given file
editConfig() Updates a config setting in the given file with the given value
errors() Return all validation errors encountered
getEnvironment() Fetches the current tasks environment
mergeConfig() Extracts all config settings from $file, merges their values into $template and writes the result back in $file.
process() Processes the given task
rollback() Rolls back all tasks completed for the upgrade process
setEnvironment() Set the environment where the task are going to be executed
tasks() Returns a numerically indexed array of tasks to execute for the upgrade process
newRecord() Creates a new database connection
replaceConfig() Replaces a config setting within the context of a string
addCouponPackageOptions() Adds the coupon_package_options table for limiting coupons based on package options
addCreditHandlingPermissions() Adds permissions for credit handling view
addCreditHandlingSettings() Adds credit handling settings to company settings
addDefaultMerchantGatewaySettings() Adds default merchant gateway settings for all companies
addLowBalanceNotificationEmail() Adds the low balance notification email group
addLowBalanceNotificationsCron() Adds the low balance notifications cron task and its runs for all companies
addNewControllerPermissions() Adds permissions for new controller actions
addPackageOptionsPricingColumns() Adds "disable_pricing" and "hide_on_invoice" columns to the package_options table
addRequeueInvoiceDeliverySetting() Adds the new company setting for requeuing invoice delivery on closure
addStatesFormatColumn() Adds a new "format" column to the states table
addStepUpAuthenticationConfig() Adds the step-up authentication configuration setting
addUserAvatarsTable() Creates a new user_avatars table
setStatesFormats() Sets the preferred state format for the existing states
updateBlacklistTable() Adds a new "block_outgoing" column to the "blacklist" table
updateCzechRepublicStates() Updates the Czech Republic States to ISO_3166-2
Properties

$tasks

private array<string|int, mixed> $tasks = []

An array of all tasks completed

Methods

addConfig()

Adds a config setting to the given file

public addConfig(string $file, string $key, mixed $value) : mixed
Parameters
$file : string

The full path to the config file

$key : string

The config setting name

$value : mixed

The config setting value

editConfig()

Updates a config setting in the given file with the given value

public editConfig(string $file, string $key, mixed $value) : mixed
Parameters
$file : string

The full path to the config file

$key : string

The config setting name

$value : mixed

The config setting value

errors()

Return all validation errors encountered

public errors() : mixed
Return values
mixed

Boolean false if no errors encountered, an array of errors otherwise

getEnvironment()

Fetches the current tasks environment

public getEnvironment() : string
Return values
string

The environment where the tasks are running

mergeConfig()

Extracts all config settings from $file, merges their values into $template and writes the result back in $file.

public mergeConfig(string $file, string $template) : mixed
Parameters
$file : string

The full path to the config

$template : string

The full path to the config template

process()

Processes the given task

public process(string $task) : mixed
Parameters
$task : string

The task to process

rollback()

Rolls back all tasks completed for the upgrade process

public rollback() : mixed

setEnvironment()

Set the environment where the task are going to be executed

public setEnvironment(string $environment) : mixed
Parameters
$environment : string

The environment where the upgrade tasks are running, "install" or "upgrade"

tasks()

Returns a numerically indexed array of tasks to execute for the upgrade process

public tasks() : array<string|int, mixed>
Return values
array<string|int, mixed>

A numerically indexed array of tasks to execute for the upgrade process

newRecord()

Creates a new database connection

protected newRecord() : Record
Return values
Record

a new instance of Record

replaceConfig()

Replaces a config setting within the context of a string

protected replaceConfig(string $key, string $value, string $contents) : string
Parameters
$key : string

The config key to replace the value of

$value : string

The new value

$contents : string

The context in which the $key is set

Return values
string

$contents with the given $value replaced

addCouponPackageOptions()

Adds the coupon_package_options table for limiting coupons based on package options

private addCouponPackageOptions([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change, or false to perform the change

addCreditHandlingPermissions()

Adds permissions for credit handling view

private addCreditHandlingPermissions([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addCreditHandlingSettings()

Adds credit handling settings to company settings

private addCreditHandlingSettings([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addDefaultMerchantGatewaySettings()

Adds default merchant gateway settings for all companies

private addDefaultMerchantGatewaySettings([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addLowBalanceNotificationEmail()

Adds the low balance notification email group

private addLowBalanceNotificationEmail([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addLowBalanceNotificationsCron()

Adds the low balance notifications cron task and its runs for all companies

private addLowBalanceNotificationsCron([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change, or false to perform the change

addNewControllerPermissions()

Adds permissions for new controller actions

private addNewControllerPermissions([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change, or false to perform the change

addPackageOptionsPricingColumns()

Adds "disable_pricing" and "hide_on_invoice" columns to the package_options table

private addPackageOptionsPricingColumns([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change, or false to perform the change

addRequeueInvoiceDeliverySetting()

Adds the new company setting for requeuing invoice delivery on closure

private addRequeueInvoiceDeliverySetting([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addStatesFormatColumn()

Adds a new "format" column to the states table

private addStatesFormatColumn([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addStepUpAuthenticationConfig()

Adds the step-up authentication configuration setting

private addStepUpAuthenticationConfig([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

addUserAvatarsTable()

Creates a new user_avatars table

private addUserAvatarsTable([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change false to perform the change

setStatesFormats()

Sets the preferred state format for the existing states

private setStatesFormats([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

updateBlacklistTable()

Adds a new "block_outgoing" column to the "blacklist" table

private updateBlacklistTable([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

updateCzechRepublicStates()

Updates the Czech Republic States to ISO_3166-2

private updateCzechRepublicStates([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

Whether to undo the upgrade

Tags
subpackage

components.upgrades.tasks

copyright

Copyright (c) 2025, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results