Blesta Source Documentation

AdminPackageOptions extends AppController

Admin Package Options Management

Table of Contents

Methods

add() Adds a package option
addGroup() Add package option group
delete() Deletes a package option
deleteGroup() Deletes a package option group
edit() Updates a package option
editGroup() Updates a package option group
exportGroup() Exports a package option group
getOption() Outputs the given package option as a json object
groupInfo() AJAX Fetch the expandable row section for package option groups
index() List package option groups/options
logic() Manages configurable options logic
logicSettings() Updates a package option group
optionInfo() AJAX Fetch the expandable row section for package options
orderOptions() Order package options within a group
orderValues() Order package option values within an option
preAction() Packages pre-action
remove() Removes a package option from a package option group
formatLogicVars() Formats logic post data to be returned to the view
formatOptionValueData() Formats the option values and pricing data submitted when adding or editing an option
getSelectedSwappableOptions() Retrieves a list of selected options for the swappable multi-select, and removes them from the available groups
updatePackageGroups() Deletes the given package option groups
updatePackageOptions() Deletes the given package options
Methods

groupInfo()

AJAX Fetch the expandable row section for package option groups

public groupInfo() : mixed

optionInfo()

AJAX Fetch the expandable row section for package options

public optionInfo() : mixed

formatLogicVars()

Formats logic post data to be returned to the view

private formatLogicVars(array<string|int, mixed> $post) : stdClass
Parameters
$post : array<string|int, mixed>

The post data to be formatted

Return values
stdClass

Formatted post data

formatOptionValueData()

Formats the option values and pricing data submitted when adding or editing an option

private formatOptionValueData(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>

A list of input vars

Return values
array<string|int, mixed>

A list of formatted input vars

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

updatePackageGroups()

Deletes the given package option groups

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

An array of POST data including:

  • package_group_ids An array of each package option group ID
  • action The action to perform, e.g. "delete_package_groups"
Return values
mixed

An array of errors, or false otherwise

updatePackageOptions()

Deletes the given package options

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

An array of POST data including:

  • package_group_ids An array of each package options ID
  • action The action to perform, e.g. "delete_package_options"
Return values
mixed

An array of errors, or false otherwise

Tags
subpackage

app.controllers

copyright

Copyright (c) 2013, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results