Documentation

Distribution
in package

Provides methods for handling different distribution types

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Reto Kohli reto.kohli@comvation.com

access

public

version
3.0.0
subpackage

module_shop

Table of Contents

Constants

TYPE_COUPON  = 'coupon'
TYPE_DELIVERY  = 'delivery'
TYPE_DOWNLOAD  = 'download'
TYPE_NONE  = 'none'

Properties

$arrDistributionTypes  : array<string|int, mixed>
The types of distribution
$defaultDistributionType  : string
The default distribution type

Methods

getDefault()  : string
Returns the default distribution type as string
getDistributionDescription()  : string
Get a short description of each distribution type.
getDistributionMenu()  : string
Returns a string containing the HTML code for the distribution type dropdown menu.
getDistributionMenuoptions()  : string
Returns a string containing the HTML code for the distribution type dropdown menu options.
isDistributionType()  : bool
Verifies whether the string argument is the name of a valid Distribution type.

Constants

Properties

$arrDistributionTypes

The types of distribution

private static array<string|int, mixed> $arrDistributionTypes = array(self::TYPE_DELIVERY, self::TYPE_DOWNLOAD, self::TYPE_NONE, self::TYPE_COUPON)
Tags
static
access

private

$defaultDistributionType

The default distribution type

private static string $defaultDistributionType = 'delivery'

Must be set to one of the values of .

Tags
static
access

private

Methods

getDefault()

Returns the default distribution type as string

public static getDefault() : string
Tags
author

Reto Kohli reto.kohli@comvation.com

static
Return values
string

The default distribution type

getDistributionDescription()

Get a short description of each distribution type.

public static getDistributionDescription() : string
Tags
global

array $_ARRAYLANG

Return values
string

getDistributionMenu()

Returns a string containing the HTML code for the distribution type dropdown menu.

public static getDistributionMenu([string $selected = '' ][, string $menuName = 'distribution' ][, mixed $onChange = '' ][, string $selectAttributes = '' ]) : string
Parameters
$selected : string = ''

The distribution type to preselect

$menuName : string = 'distribution'

The name and ID for the select element

$onChange : mixed = ''
$selectAttributes : string = ''

Optional attributes for the select tag

Tags
author

Reto Kohli reto.kohli@comvation.com

static
Return values
string

The dropdown menu code

getDistributionMenuoptions()

Returns a string containing the HTML code for the distribution type dropdown menu options.

public static getDistributionMenuoptions([string $selected = '' ]) : string
Parameters
$selected : string = ''

The distribution type to preselect

Tags
author

Reto Kohli reto.kohli@comvation.com

static
Return values
string

The HTML dropdown menu options code

isDistributionType()

Verifies whether the string argument is the name of a valid Distribution type.

public static isDistributionType(string $string) : bool
Parameters
$string : string
Tags
author

Reto Kohli reto.kohli@comvation.com

static
Return values
bool

True for valid distribution types, false otherwise


        
On this page

Search results