ModelAttributeToCastTypeUtil Class Reference

Static Public Member Functions

static resolveValueForCast ($model, $attributeName, $value)
static getCastType ($model, $attributeName)

Static Protected Member Functions

static getOperatorTypeFromModelMetadataElement ($element)

Detailed Description

Given a model and its attribute, find the appropriate cast.

Definition at line 40 of file ModelAttributeToCastTypeUtil.php.


Member Function Documentation

static resolveValueForCast ( model,
attributeName,
value 
) [static]

For a given $attributeName on a $model, set the cast of the $value based on what the castType should be for that attribute.

Parameters:
$model 
$attributeName 
$value 
See also:
ModelAttributeToCastTypeUtil::getCastType
Returns:
casted $value

Definition at line 51 of file ModelAttributeToCastTypeUtil.php.

static getCastType ( model,
attributeName 
) [static]

Returns the cast type that should be used with the named attribute of the given model. If the model is a customField, it assumes some sort of dropdown and returns 'equals'.

Definition at line 63 of file ModelAttributeToCastTypeUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon May 29 07:10:27 2017