All Data Structures Functions Variables Pages
Static Public Member Functions
CustomFieldDataModelUtil Class Reference

Static Public Member Functions

static getModelPluralNameAndAttributeLabelsByName ($name)
 
static getDataByModelClassNameAndAttributeName ($modelClassName, $attributeName)
 

Detailed Description

Helper class to interrogate relationships between customFieldData models and other models in the application.

Definition at line 41 of file CustomFieldDataModelUtil.php.

Member Function Documentation

static getModelPluralNameAndAttributeLabelsByName (   $name)
static

Use this function to ascertain if a particular customFieldData model is used by more than one attribute in the application. An example is a pick list that is shared by two separate attributes in two different models.

Returns
array of model plural label / attribute label pairings.

Important Limitations to understand!! Only supports up to one attribute per model that uses the same customFieldData. Only searches primary models of the modules in the system. Do not search for custedUp relationships, for example do not return person Title, but it is used in User and Contact models

Definition at line 55 of file CustomFieldDataModelUtil.php.

static getDataByModelClassNameAndAttributeName (   $modelClassName,
  $attributeName 
)
static

Given a model class name and an attribute name, get the CustomFieldData object associated with this attribute. Requires the attribute to be a customField type attribute otherwise it will throw an error.

Parameters
string$modelClassName
string$attributeName

Definition at line 88 of file CustomFieldDataModelUtil.php.


The documentation for this class was generated from the following file:
Generated on Mon Feb 24 2020 07:10:42