All Data Structures Functions Variables Pages
Public Member Functions | Protected Attributes
ModelAttributesAdapter Class Reference
Inheritance diagram for ModelAttributesAdapter:
CalculatedNumberModelDerivedAttributesAdapter ContactStateModelAttributesAdapter ContactWebFormModelAttributesAdapter CurrencyValueModelAttributesAdapter DateTimeModelAttributesAdapter DropDownDependencyModelDerivedAttributesAdapter DropDownModelAttributesAdapter HasOneModelAttributesAdapter

Public Member Functions

 __construct (RedBeanModel $model)
 
 getModel ()
 
 getAttributes ()
 
 getStandardAttributes ()
 
 isStandardAttribute ($attributeName)
 
 getCustomAttributes ()
 
 setAttributeMetadataFromForm (AttributeForm $attributeForm)
 
 removeAttributeMetadata ($attributeName)
 
 resolveDatabaseSchemaForModel ($modelClassName)
 
 isStandardAttributeRequiredByDefault ($attributeName)
 

Protected Attributes

 $model
 

Detailed Description

Adapter class to get attributes from a model as an array.

Definition at line 41 of file ModelAttributesAdapter.php.

Member Function Documentation

getAttributes ( )

Returns HAS_ONE relation attributes and non-relation attributes in an array mapping attribute names to 'attributeLabel' to the attribute label. Also returns 'isRequired' and 'isAudited' information.

Definition at line 62 of file ModelAttributesAdapter.php.

getStandardAttributes ( )

Returns standard attributes in same format as getAttributes returns.

Definition at line 120 of file ModelAttributesAdapter.php.

isStandardAttribute (   $attributeName)

Given an attributeName, is this a default attribute on the model

Definition at line 137 of file ModelAttributesAdapter.php.

getCustomAttributes ( )

Returns custom attributes in same format as getAttributes returns.

Definition at line 151 of file ModelAttributesAdapter.php.

removeAttributeMetadata (   $attributeName)
Parameters
string$attributeName

Definition at line 274 of file ModelAttributesAdapter.php.

isStandardAttributeRequiredByDefault (   $attributeName)

Given a standard attribute, check if by default, this attribute is required. This means the default metadata has this attribute has being required, regardless of any customziation to that metadata.

Parameters
string$attributeName
Exceptions
NotSupportedException
Returns
boolean

Definition at line 301 of file ModelAttributesAdapter.php.


The documentation for this class was generated from the following file:
Generated on Sun May 31 2020 07:10:53