Blesta Source Documentation

Upgrade5_2_0B1 extends UpgradeUtil

Upgrades to version 5.2.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
addClientsCanRenewSetting() Adds the new "clients_renew_services" company setting
addInclusiveCalculatedTaxType() Add an `inclusive_calculated` column to the package_option table
addInvoiceLineTaxesSubtractColumn() Adds a new "subtract" column to the invoice_line_taxes table
addOptionConditionNotinOperator() Adds a new "notin" operator to the package_option_conditions
addOptionGroupsHideOptions() Adds a new "hide_options" column to the package_option_groups table
addPackageOptionConditionSetValues() Adds a new "package_option_condition_set_values" table
addPackageOptionOrderColumn() Add an `order` column to the package_option table
addServicesClientNavigationItem() Adds a new "Services" action on the client navigation bar
convertPackageOptionConditionValueId() Updates "package_option_conditions.value_id" to a text field
migrateUkFromViesToHmrc() Migrates the UK VIES VAT validation to the HMRC VAT validation
removeAccountAndContactClientNav() Removes the 'Contacts' and 'Payment Accounts' nav items from the client interface
removePostalMethodsReturnAddressCompanySettings() Removes the Postal Methods Return Address company settings
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

addClientsCanRenewSetting()

Adds the new "clients_renew_services" company setting

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

Whether to undo the upgrade

addInclusiveCalculatedTaxType()

Add an `inclusive_calculated` column to the package_option table

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

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

addInvoiceLineTaxesSubtractColumn()

Adds a new "subtract" column to the invoice_line_taxes table

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

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

addOptionConditionNotinOperator()

Adds a new "notin" operator to the package_option_conditions

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

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

addOptionGroupsHideOptions()

Adds a new "hide_options" column to the package_option_groups table

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

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

addPackageOptionConditionSetValues()

Adds a new "package_option_condition_set_values" table

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

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

addPackageOptionOrderColumn()

Add an `order` column to the package_option table

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

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

addServicesClientNavigationItem()

Adds a new "Services" action on the client navigation bar

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

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

convertPackageOptionConditionValueId()

Updates "package_option_conditions.value_id" to a text field

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

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

migrateUkFromViesToHmrc()

Migrates the UK VIES VAT validation to the HMRC VAT validation

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

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

removeAccountAndContactClientNav()

Removes the 'Contacts' and 'Payment Accounts' nav items from the client interface

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

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

removePostalMethodsReturnAddressCompanySettings()

Removes the Postal Methods Return Address company settings

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

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

Tags
subpackage

components.upgrades.tasks

copyright

Copyright (c) 2021, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results