All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
ZurmoCopyModelUtil Class Reference
Inheritance diagram for ZurmoCopyModelUtil:
ActivityCopyModelUtil CampaignCopyModelUtil ProductZurmoCopyModelUtil ProjectZurmoCopyModelUtil SavedReportCopyModelUtil TaskActivityCopyModelUtil

Static Public Member Functions

static copy (RedBeanModel $model, RedBeanModel $copyToModel)
 

Static Protected Member Functions

static copyNonRelation (RedBeanModel $model, $attributeName, RedBeanModel $copyToModel)
 
static copyRelation (RedBeanModel $model, $attributeName, RedBeanModel $copyToModel)
 
static copyOwnedModelRelation (RedBeanModel $model, $attributeName, RedBeanModel $copyToModel)
 
static copyMultipleValuesCustomFieldRelation (RedBeanModel $model, $attributeName, RedBeanModel $copyToModel)
 
static resolveExplicitPermissions (RedBeanModel $model, RedBeanModel $copyToModel)
 

Detailed Description

Utility for copying the attributes from one model to another. Utilized by 'duplicate' functionality accessed from a detail view for a model.

Definition at line 41 of file ZurmoCopyModelUtil.php.

Member Function Documentation

static copy ( RedBeanModel  $model,
RedBeanModel  $copyToModel 
)
static

Copy attributes from one model to another. If the attributes are relations, then only copy when it is a HAS_ONE variant. In the case that the relation is an OwnedModel, take special consideration for CurrencyValue CustomField, and MultipleValuesCustomField models. If it is owned and not one of those 3, then it should just copy the OwnedModel nonRelation attributes. An example of that would be Address or Email

Parameters
RedBeanModel$model
RedBeanModel$copyToModel- model to copy attribute values from $model to

Definition at line 51 of file ZurmoCopyModelUtil.php.


The documentation for this class was generated from the following file:
Generated on Tue Jan 28 2020 07:10:45