Documentation

CRM_Core_BAO_CustomOption
in package

Business objects for managing custom data options.

Table of Contents

Methods

del()  : mixed
Delete Option.
getCustomOption()  : array<string|int, mixed>
Returns all active options ordered by weight for a given field.
getOptionListSelector()  : array<string|int, mixed>
Wrapper for ajax option selector.
retrieve()  : CRM_Core_DAO_OptionValue|null
Retrieve DB object and copy to defaults array.
updateValue()  : mixed
When changing the value of an option this is called to update all corresponding custom data

Methods

del()

Delete Option.

public static del(int $optionId) : mixed
Parameters
$optionId : int

option id

getCustomOption()

Returns all active options ordered by weight for a given field.

public static getCustomOption(int $fieldID[, bool $inactiveNeeded = FALSE ]) : array<string|int, mixed>
Parameters
$fieldID : int

Field whose options are needed.

$inactiveNeeded : bool = FALSE

Do we need inactive options ?. Do we need inactive options ?.

Return values
array<string|int, mixed>

all active options for fieldId

getOptionListSelector()

Wrapper for ajax option selector.

public static getOptionListSelector(array<string|int, mixed> &$params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Associated array for params record id.

Return values
array<string|int, mixed>

associated array of option list -rp = rowcount -page= offset

retrieve()

Retrieve DB object and copy to defaults array.

public static retrieve(array<string|int, mixed> $params, array<string|int, mixed> &$defaults) : CRM_Core_DAO_OptionValue|null
Parameters
$params : array<string|int, mixed>
$defaults : array<string|int, mixed>
Return values
CRM_Core_DAO_OptionValue|null

updateValue()

When changing the value of an option this is called to update all corresponding custom data

public static updateValue(int $optionId, string $newValue) : mixed
Parameters
$optionId : int
$newValue : string

        
On this page

Search results