Blesta Source Documentation

OrderSettings extends OrderModel

Order Settings

Manage all order settings for the plugin

Table of Contents

Properties

$errors

Methods

getAntifraud() Fetches all antifraud components available
getSetting() Fetch a single setting by key name
getSettings() Fetches all order settings
setSetting() Sets the setting with the given key, overwriting any existing value with that key
setSettings() Sets a group of settings with key/value pairs
unsetSetting() Unsets a setting from the order settings.
getSettingRules() Retrieves rules for adding a setting
overrideInputErrors() Overrides any input errors with new messages
Properties

$errors

private array<string|int, mixed> $errors = []

Input error messages

Methods

getAntifraud()

Fetches all antifraud components available

public getAntifraud() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array of key/value pairs where each key is the antifraud component class and each value is its name

getSetting()

Fetch a single setting by key name

public getSetting(int $company_id, string $key) : mixed
Parameters
$company_id : int

The company ID

$key : string

The key name of the setting to fetch

Return values
mixed

An stdObject containing the key and value, false if no such key exists

getSettings()

Fetches all order settings

public getSettings(int $company_id) : mixed
Parameters
$company_id : int

The company ID

Return values
mixed

An array of objects with key/value pairs of settings, false if no results found

setSetting()

Sets the setting with the given key, overwriting any existing value with that key

public setSetting(int $company_id, string $key, string $value[, mixed $encrypted = null ]) : mixed
Parameters
$company_id : int

The company ID

$key : string

The setting identifier

$value : string

The value to set for this setting

$encrypted : mixed = null

True to encrypt $value, false to store unencrypted, null to encrypt if currently set to encrypt

setSettings()

Sets a group of settings with key/value pairs

public setSettings(int $company_id, array<string|int, mixed> $settings) : mixed
Parameters
$company_id : int

The company ID

$settings : array<string|int, mixed>

Settings to set as key/value pairs

Tags
see
Settings::setSetting()

unsetSetting()

Unsets a setting from the order settings.

public unsetSetting(int $company_id, string $key) : mixed
Parameters
$company_id : int

The company ID

$key : string

The setting to unset

getSettingRules()

Retrieves rules for adding a setting

private getSettingRules() : array<string|int, mixed>
Return values
array<string|int, mixed>

The input validation rules

overrideInputErrors()

Overrides any input errors with new messages

private overrideInputErrors() : mixed
Tags
see
Input::errors
Tags
subpackage

plugins.order.models

copyright

Copyright (c) 2010, Phillips Data, Inc.

license

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

link

Blesta


        
On this page

Search results