Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
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
Returns
string - If the class name is TestImportRules, then 'Test' will be returned.

Definition at line 61 of file ImportRules.php.

static getModelClassName ( )
static

Get model class name associated with the import rules.

Returns
string

Definition at line 72 of file ImportRules.php.

static getModuleClassNames ( )
static

Get module class names associated with the import rules.

Returns
array

Definition at line 80 of file ImportRules.php.

static getDisplayLabel ( )
static

Get the display label used to describe the import rules.

Returns
string

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.

Returns
array

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.

Returns
array

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.

Returns
array

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.

Returns
array

Definition at line 137 of file ImportRules.php.

static resolveIsAttributeANonImportableAttributeName (   $attributeData)
staticprotected

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)
staticprotected

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

Parameters
string$modelClassName
See Also
self::getMappableAttributeIndicesAndDerivedTypes()
Returns
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
self::getAttributesCollectionByModelClassName($modelClassName)
Returns
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.

Parameters
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.

Parameters
string$attributeIndexOrDerivedType
Exceptions
NotSupportedException
Returns
string - attribute rules type.

Definition at line 229 of file ImportRules.php.

static resolveAttributeImportRulesDataByModelClassNameAndCache (   $modelClassName)
staticprotected

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
self::$attributeImportRulesDataByModelClassName;
Parameters
string$modelClassName
Returns
array $attributeImportRulesData

Definition at line 249 of file ImportRules.php.

static getAttributeIndexOrDerivedTypeAndAttributeImportRuleTypes (   $modelClassName)
staticprotected

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.

Parameters
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.

Returns
array

Definition at line 302 of file ImportRules.php.

static resolveRequiredDerivedAttributesCollection ( $attributesCollection)
staticprotected

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

Parameters
Array$attributesCollection

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

Returns
array

Definition at line 376 of file ImportRules.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 13 2020 07:10:50
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.