LabelUtil Class Reference

Static Public Member Functions

static getUncapitalizedRecordLabelByCount ($count)
static getUncapitalizedModelLabelByCountAndModelClassName ($count, $modelClassName)
static getTranslationParamsForAllModules ()
static makeModelAndAttributeNameCombinationLabel ($modelClassName, $attributeName)
static getZurmoLabelParam ()

Detailed Description

Helper functionality for use in determining the correct label to display based on a dynamic piece of information.

Definition at line 41 of file LabelUtil.php.

Member Function Documentation

static getUncapitalizedRecordLabelByCount ( count  )  [static]

Returns either record or records depending on input count

Definition at line 46 of file LabelUtil.php.

static getUncapitalizedModelLabelByCountAndModelClassName ( count,
) [static]

Returns either a singular or plural model label depending on input count

Definition at line 59 of file LabelUtil.php.

static getTranslationParamsForAllModules (  )  [static]

Module translation parameters are used by Zurmo::t as the third parameter to define the module labels. These parameter values resolve any custom module label names that have been specified in the module metadata.

array of key/value module label pairings. TODO: cache results after first retrieval on each page load. Potentially across mulitple page loads

Definition at line 75 of file LabelUtil.php.

static makeModelAndAttributeNameCombinationLabel ( modelClassName,
) [static]

Given a model class name and an attribute name, make a label that combines the translated model and attribute names.

string $modelClassName
string $attributeName

Definition at line 86 of file LabelUtil.php.

static getZurmoLabelParam (  )  [static]

Get zurmo label param.


Definition at line 97 of file LabelUtil.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jan 18 07:11:00 2020