Blesta Source Documentation

Upgrade4_9_0B1 extends UpgradeUtil

Upgrades to version 4.9.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
addCancellationBccNotices() Add BCC notice settings for staff members
addClientSettingIndex() Add index on client ID for the client_settings table
addEmailSentIndex() Add an index for the `sent` column of the `log_emails` table
addPackageClientQty() Add the client_qty field to the packages table
addPasswordResetPermission() Adds a new Send Password Reset permission for Admin Clients
addPluginActionEnabled() Updates `plugin_actions` to have a new 'enabled' column
addPluginEventEnabled() Updates `plugin_events` to have a new 'enabled' column
addPluginSettingPermission() Adds a new permission for Plugin Settings
addRenewalErrorBccNotices() Add BCC notice settings for staff members
addRenewalErrorEmail() Adds a new email template for service renewal failures
addSendCancellationNoticesSetting() Adds new setting for whether to send service cancellation notices
addServiceCancellationEmail() Adds a new email template for service cancellation
updateConfig() Updates the config
updateIpAddressLength() Increases the length of ip_address fields in log_users and log_client_settings tables
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

addCancellationBccNotices()

Add BCC notice settings for staff members

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

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

addClientSettingIndex()

Add index on client ID for the client_settings table

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

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

addEmailSentIndex()

Add an index for the `sent` column of the `log_emails` table

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

True to undo the change, false to perform the change

addPackageClientQty()

Add the client_qty field to the packages table

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

True to undo the change false to perform the change

addPasswordResetPermission()

Adds a new Send Password Reset permission for Admin Clients

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

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

addPluginActionEnabled()

Updates `plugin_actions` to have a new 'enabled' column

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

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

addPluginEventEnabled()

Updates `plugin_events` to have a new 'enabled' column

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

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

addPluginSettingPermission()

Adds a new permission for Plugin Settings

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

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

addRenewalErrorBccNotices()

Add BCC notice settings for staff members

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

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

addRenewalErrorEmail()

Adds a new email template for service renewal failures

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

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

addSendCancellationNoticesSetting()

Adds new setting for whether to send service cancellation notices

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

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

addServiceCancellationEmail()

Adds a new email template for service cancellation

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

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

updateConfig()

Updates the config

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

True to undo the change false to perform the change

updateIpAddressLength()

Increases the length of ip_address fields in log_users and log_client_settings tables

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

Whether to add or undo the change

Tags
subpackage

components.upgrades.tasks

copyright

Copyright (c) 2020, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results