CustomFieldDataUtil Class Reference

Static Public Member Functions

static getDataIndexedByDataAndTranslatedLabelsByLanguage (CustomFieldData $customFieldData, $language)
static getTranslatedLabelByValue (CustomFieldData $customFieldData, $value, $language)

Static Protected Member Functions

static getDataLabelsByLanguage ($data, $language, $customLabels)

Detailed Description

Helper class for working with CustomFieldData

Definition at line 40 of file CustomFieldDataUtil.php.


Member Function Documentation

static getDataIndexedByDataAndTranslatedLabelsByLanguage ( CustomFieldData customFieldData,
language 
) [static]

Given a CustomFieldData object, return an array of data and translated labels indexed by the data name.

Parameters:
CustomFieldData $customFieldData $param string $language

Definition at line 47 of file CustomFieldDataUtil.php.

static getDataLabelsByLanguage ( data,
language,
customLabels 
) [static, protected]

Given an array of data names, a language, and an array of custom labels make an array of data names paired with their labels. If a custom label is available then utilize that for each data name, otherwise fallback to using the messages file to translate the label. If the messages file does not have a translation, then the data name will be used as the label.

Parameters:
$data 
$language 
Returns:
array - labels for each data name.

Definition at line 84 of file CustomFieldDataUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Aug 21 07:10:24 2017