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

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

Reimplemented in ActivityCopyModelUtil, CampaignCopyModelUtil, ProductZurmoCopyModelUtil, ProjectZurmoCopyModelUtil, and TaskActivityCopyModelUtil.

Definition at line 51 of file ZurmoCopyModelUtil.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Oct 16 07:11:06 2019