Blesta Source Documentation

AdminPackages extends AppController

Admin Packages Management

Table of Contents

Methods

add() Add package
addGroup() Add a package group
delete() Delete package
deleteGroup() Deletes a package group
edit() Edit package
editGroup() Edit a package group
getModules() AJAX Fetch all modules (json encoded ajax request)
groups() Package groups
index() List packages
moduleOptions() List module options for ajax requests
orderPackages() Order packages within a package group
packagePricing() AJAX request for all pricing details for a package
preAction() Packages pre-action
arrayValuesToObject() Converts the given array values to objects iff they are arrays
getPlugins() Retrieves a set of available plugins that support service tabs
getSelectedSwappableOptions() Retrieves a list of selected options for the swappable multi-select, and removes them from the available groups
getWelcomeTags() Returns a string containing all welcome tags available by default to package welcome emails
updatePackages() Deletes the given packages
Methods

deleteGroup()

Deletes a package group

public deleteGroup() : mixed

getModules()

AJAX Fetch all modules (json encoded ajax request)

public getModules() : mixed

moduleOptions()

List module options for ajax requests

public moduleOptions() : mixed

orderPackages()

Order packages within a package group

public orderPackages() : mixed

packagePricing()

AJAX request for all pricing details for a package

public packagePricing() : mixed

arrayValuesToObject()

Converts the given array values to objects iff they are arrays

private arrayValuesToObject(array<string|int, mixed> $arr) : The
Parameters
$arr : array<string|int, mixed>

The array whose array values to convert into objects

Return values
The

original array with stdCLass object values for each array

getPlugins()

Retrieves a set of available plugins that support service tabs

private getPlugins(int $company_id) : array<string|int, mixed>
Parameters
$company_id : int

The ID of the company to filter plugins for

Return values
array<string|int, mixed>

An array of plugins

getSelectedSwappableOptions()

Retrieves a list of selected options for the swappable multi-select, and removes them from the available groups

private getSelectedSwappableOptions(array<string|int, mixed> &$available_groups, array<string|int, mixed> $selected_groups) : array<string|int, mixed>
Parameters
$available_groups : array<string|int, mixed>

A reference to a key/value array of all the available groups to choose from

$selected_groups : array<string|int, mixed>

A key/value array of all the selected groups

Return values
array<string|int, mixed>

A key/value indexed array subset of the $available_groups that have been selected

getWelcomeTags()

Returns a string containing all welcome tags available by default to package welcome emails

private getWelcomeTags() : string
Return values
string

A string containing all welcome tags available by default to package welcome emails

updatePackages()

Deletes the given packages

private updatePackages(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

An array of POST data including:

  • package_ids An array of each package ID
  • action The action to perform, e.g. "delete_packages"
Return values
mixed

An array of errors, or false otherwise

Tags
subpackage

app.controllers

copyright

Copyright (c) 2010, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results