Blesta Source Documentation

Upgrade5_11_0B1 extends UpgradeUtil

Upgrades to version 5.11.0-b1

Table of Contents

Properties

$tasks

Methods

__construct() Setup
addConfig() Adds a config setting to the given file
addDefaultEmailTemplate() Adds a new permission for the Email Templates settings page
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
addAttemptsSetting() Adds the company settings for Service Provisioning Attempts
addEditServiceAdvancedPermissions() Adds a new permission for the Advanced Options tab under Edit Service
addEmailTemplatesPermissions() Adds a new permission for the Email Templates settings page
addEmailTemplatesTable() Adds a new "email_attachments" table
addLogServiceChangesTable() Adds a new "log_service_changes" table
addPackagesDataFeed() Adds the data feed for packages
addServiceAttemptSpacingSettings() Adds the company settings for Service attempt Spacing
addServiceInvoicesForExistingServices() Adds a service invoice for all previous paid pending services
addTemplateIdEmailGroupsTable() Adds a new "template_id" column to the "email_groups" table
updateClientGroupSettingKeyColumnLength() Updates the client_group_settings.key column to allow longer strings
updateFiveTheme() Updates the default "FIVE" theme
updateServicesInvoicesTable() Updates the service_invoices.invoice_id field from NOT NULL to NULL
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

addDefaultEmailTemplate()

Adds a new permission for the Email Templates settings page

public addDefaultEmailTemplate([bool $undo = false ]) : mixed
Parameters
$undo : bool = false

True to undo the change false to perform the change

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

addAttemptsSetting()

Adds the company settings for Service Provisioning Attempts

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

True to undo the change, false to perform the change

addEditServiceAdvancedPermissions()

Adds a new permission for the Advanced Options tab under Edit Service

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

True to undo the change false to perform the change

addEmailTemplatesPermissions()

Adds a new permission for the Email Templates settings page

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

True to undo the change false to perform the change

addEmailTemplatesTable()

Adds a new "email_attachments" table

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

Whether to undo the upgrade

addLogServiceChangesTable()

Adds a new "log_service_changes" table

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

Whether to undo the upgrade

addPackagesDataFeed()

Adds the data feed for packages

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

Whether to undo the upgrade

addServiceAttemptSpacingSettings()

Adds the company settings for Service attempt Spacing

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

True to undo the change, false to perform the change

addServiceInvoicesForExistingServices()

Adds a service invoice for all previous paid pending services

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

True to undo the change, false to perform the change

addTemplateIdEmailGroupsTable()

Adds a new "template_id" column to the "email_groups" table

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

True to undo the change false to perform the change

updateClientGroupSettingKeyColumnLength()

Updates the client_group_settings.key column to allow longer strings

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

True to undo the change false to perform the change

updateFiveTheme()

Updates the default "FIVE" theme

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

Whether to undo the upgrade

updateServicesInvoicesTable()

Updates the service_invoices.invoice_id field from NOT NULL to NULL

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

True to undo the change false to perform the change

Tags
subpackage

components.upgrades.tasks

copyright

Copyright (c) 2024, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results