ImportRules Class Reference

Inheritance diagram for ImportRules:
AccountAccountAffiliationsImportRules AccountContactAffiliationsImportRules AccountsImportRules ContactsImportRules DerivedAttributeSupportedImportRules ImportDedupeModelTestItemImportRules LeadsImportRules OpportunitiesImportRules ProductsImportRules ProductTemplatesImportRules ProjectsImportRules UsersImportRules

Static Public Member Functions

static resetCache ()
static getType ()
static getModelClassName ()
static getModuleClassNames ()
static getDisplayLabel ()
static getDerivedAttributeTypes ()
static getNonImportableAttributeNames ()
static getNonImportableAttributeImportRulesTypes ()
static getMappableAttributeIndicesAndDerivedTypes ()
static getAttributesCollection ()
static getModelClassNameByAttributeIndexOrDerivedType ($attributeIndexOrDerivedType)
static getAttributeImportRulesType ($attributeIndexOrDerivedType)
static getRequiredAttributesCollectionNotIncludingReadOnly ()
static getRequiredAttributesLabelsData ()
static getDedupeAttributes ()

Static Protected Member Functions

static resolveIsAttributeANonImportableAttributeName ($attributeData)
static getAttributesCollectionByModelClassName ($modelClassName)
static getModelAttributesImportMappingAdapterByModelClassName ($modelClassName)
static resolveAttributeImportRulesDataByModelClassNameAndCache ($modelClassName)
static getAttributeIndexOrDerivedTypeAndAttributeImportRuleTypes ($modelClassName)
static resolveRequiredDerivedAttributesCollection (&$attributesCollection)

Detailed Description

Base class of import rules that assist with importing data from an external system. Extend this class to make a set of ImportRules that is for a specific module or a combination of modules and/or models.

Definition at line 41 of file ImportRules.php.

Member Function Documentation

static resetCache (  )  [static]

Used for testing.

Definition at line 53 of file ImportRules.php.

static getType (  )  [static]
string - If the class name is TestImportRules, then 'Test' will be returned.

Definition at line 61 of file ImportRules.php.

static getModuleClassNames (  )  [static]

Get module class names associated with the import rules.


Definition at line 80 of file ImportRules.php.

static getDisplayLabel (  )  [static]

Get the display label used to describe the import rules.


Reimplemented in LeadsImportRules.

Definition at line 93 of file ImportRules.php.

static getDerivedAttributeTypes (  )  [static]

Get the array of available derived attribute types that can be mapped when using these import rules.


Reimplemented in ActivitiesImportRules, ContactsImportRules, ImportModelTestItem5ImportRules, ImportModelTestItemImportRules, LeadsImportRules, and UsersImportRules.

Definition at line 106 of file ImportRules.php.

static getNonImportableAttributeNames (  )  [static]

Get the array of attributes that cannot be mapped when using these import rules.


Reimplemented in AccountContactAffiliationsImportRules, AccountsImportRules, ActivitiesImportRules, ContactsImportRules, LeadsImportRules, OpportunitiesImportRules, and UsersImportRules.

Definition at line 115 of file ImportRules.php.

static getNonImportableAttributeImportRulesTypes (  )  [static]

Get the array of derived attributes that cannot be mappen when using these import rules.


Definition at line 124 of file ImportRules.php.

static getMappableAttributeIndicesAndDerivedTypes (  )  [static]

Get mappable attribute indices and derived types in one array. Mappable indices are strings of attribute and related attribute information. For example, an attribute 'text' on a model would have an index of 'text'. An attribute that is a related model 'relatedModel' with a related attribute 'string' would be returned as 'relatedModel__string'. This array filters out any non-placeable derived types or attributes before returning the array.


Definition at line 137 of file ImportRules.php.

static resolveIsAttributeANonImportableAttributeName ( attributeData  )  [static, protected]

Resolves for relationAttributeNames as well. Inside static::getNonImportableAttributeNames() you could have billingAddress__latitude for example, and this would resolve correctly against the attributeName as billingAddress and the relationAttributeName as latitude

Definition at line 168 of file ImportRules.php.

static getAttributesCollectionByModelClassName ( modelClassName  )  [static, protected]

Gets the attribute collection indexed by attribute indices for a particular model.

string $modelClassName
See also:
array Attribute colleciton.

Definition at line 189 of file ImportRules.php.

static getAttributesCollection (  )  [static]

Publically facing method to return the attribute collection based on the model class supported by the import rules.

See also:
array Attribute colleciton.

Definition at line 208 of file ImportRules.php.

static getModelClassNameByAttributeIndexOrDerivedType ( attributeIndexOrDerivedType  )  [static]

Given an attribute index or derived type, return the model class name that it is from.

string $attributeIndexOrDerivedType

Definition at line 217 of file ImportRules.php.

static getAttributeImportRulesType ( attributeIndexOrDerivedType  )  [static]

Given an attribute index or derived type, return the appropriate attribute rules type.

string $attributeIndexOrDerivedType
string - attribute rules type.

Definition at line 229 of file ImportRules.php.

static resolveAttributeImportRulesDataByModelClassNameAndCache ( modelClassName  )  [static, protected]

Get the attributeImportRulesData either from an existing cached value or by calling another method to make it. Values are cached in an array indexed my model class name.

See also:
string $modelClassName
array $attributeImportRulesData

Definition at line 249 of file ImportRules.php.

static getAttributeIndexOrDerivedTypeAndAttributeImportRuleTypes ( modelClassName  )  [static, protected]

Given a model class name, return an array of attribute indexes and derived attribute types as the array's indexes, while using the attribute import rules type as the array values.

string $modelClassName

Definition at line 274 of file ImportRules.php.

static getRequiredAttributesCollectionNotIncludingReadOnly (  )  [static]

For this set of import rules, get only the required attributes indexed by attribute index in an attribute collection array. This will filter out any required attributes that are read only on their respective models. Owner is not marked as required because it will default to the person importing.


Definition at line 302 of file ImportRules.php.

static resolveRequiredDerivedAttributesCollection ( &$  attributesCollection  )  [static, protected]

If there is any derived attribute with a real attribute required that is not yeat in the attributesCollection, if populate the Collection with the date from the derived attribute

Array $attributesCollection

Reimplemented in UsersImportRules.

Definition at line 328 of file ImportRules.php.

static getRequiredAttributesLabelsData (  )  [static]

Returns an array of required attribute labels.

Definition at line 361 of file ImportRules.php.

static getDedupeAttributes (  )  [static]

Get fields for which dedupe ruled would be executed


Reimplemented in AccountsImportRules, ContactsImportRules, and ImportDedupeModelTestItemImportRules.

Definition at line 376 of file ImportRules.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Thu Mar 30 07:10:26 2017