Documentation

CRM_Core_OptionValue
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Properties

$_exportableFields  : array<string|int, mixed>
Static field for all the option value information that we can potentially export.
$_fields  : array<string|int, mixed>
Static field for all the option value information that we can potentially export.
$_importableFields  : array<string|int, mixed>
Static field for all the option value information that we can potentially export.

Methods

addOptionValue()  : CRM_Core_DAO_OptionValue
Add/edit option-value of a particular group
getFields()  : array<string|int, mixed>
Check if there is a record with the same name in the db.
getRows()  : array<string|int, mixed>
Return option-values of a particular group
getValues()  : array<string|int, mixed>
Return option-values of a particular group
optionExists()  : bool
Check if there is a record with the same name in the db.
select()  : mixed
Build select query in case of option-values

Properties

$_exportableFields

Static field for all the option value information that we can potentially export.

public static array<string|int, mixed> $_exportableFields = \NULL

$_fields

Static field for all the option value information that we can potentially export.

public static array<string|int, mixed> $_fields = \NULL

$_importableFields

Static field for all the option value information that we can potentially export.

public static array<string|int, mixed> $_importableFields = \NULL

Methods

addOptionValue()

Add/edit option-value of a particular group

public static addOptionValue(array<string|int, mixed> &$params, string $optionGroupName, mixed $action, int $optionValueID) : CRM_Core_DAO_OptionValue
Parameters
$params : array<string|int, mixed>

Array containing exported values from the invoking form.

$optionGroupName : string

Array containing group fields whose option-values is to retrieved/saved.

$action : mixed
$optionValueID : int

Has the id of the optionValue being edited, disabled ..etc. Has the id of the optionValue being edited, disabled ..etc.

Return values
CRM_Core_DAO_OptionValue

getFields()

Check if there is a record with the same name in the db.

public static getFields([string $mode = '' ][, string $contactType = 'Individual' ]) : array<string|int, mixed>
Parameters
$mode : string = ''
$contactType : string = 'Individual'
Return values
array<string|int, mixed>

getRows()

Return option-values of a particular group

public static getRows(array<string|int, mixed> $groupParams, array<string|int, mixed> $links[, string $orderBy = 'weight' ][, bool $skipEmptyComponents = true ]) : array<string|int, mixed>
Parameters
$groupParams : array<string|int, mixed>

Array containing group fields whose option-values is to retrieved.

$links : array<string|int, mixed>

Has links like edit, delete, disable ..etc.

$orderBy : string = 'weight'

For orderBy clause.

$skipEmptyComponents : bool = true

Whether to skip OptionValue rows with empty Component name (i.e. when Extension providing the Component is disabled)

Return values
array<string|int, mixed>

Array of option-values

getValues()

Return option-values of a particular group

public static getValues(array<string|int, mixed> $groupParams[, array<string|int, mixed> &$values = [] ][, string $orderBy = 'weight' ][, bool $isActive = false ]) : array<string|int, mixed>
Parameters
$groupParams : array<string|int, mixed>

Array containing group fields. whose option-values is to retrieved.

$values : array<string|int, mixed> = []

(reference) to the array which. will have the values for the group

$orderBy : string = 'weight'

For orderBy clause.

$isActive : bool = false

Do you want only active option values?

Return values
array<string|int, mixed>

Array of option-values

optionExists()

Check if there is a record with the same name in the db.

public static optionExists(string $value, string $daoName, string $daoID, int $optionGroupID, string $fieldName) : bool
Parameters
$value : string

The value of the field we are checking.

$daoName : string

The dao object name.

$daoID : string

The id of the object being updated. u can change your name. as long as there is no conflict

$optionGroupID : int
$fieldName : string

The name of the field in the DAO.

Return values
bool

true if object exists


        
On this page

Search results