Helper class for working with ImportRules.
Definition at line 40 of file ImportRulesUtil.php.
static getImportRulesClassNameByType |
( |
|
$importRulesType | ) |
|
|
static |
static makeImportRulesByType |
( |
|
$importRulesType | ) |
|
|
static |
static getImportRulesTypesForCurrentUser |
( |
| ) |
|
|
static |
Based on the current user, return the importRules types and their display labels. Only include import rules that the user has a right to access its corresponding module.
- Returns
- array of import rules types and display labels.
Definition at line 74 of file ImportRulesUtil.php.
static areAllRequiredAttributesMappedOrHaveRules |
( |
& |
$requiredAttributeCollection, |
|
|
|
$mappedAttributeImportRulesCollection |
|
) |
| |
|
static |
Given a collection of required attributes by attribute indexes and a collection of mapped attribute rules, check if all of the required attributes are mapped.
- Parameters
-
array | $requiredAttributeCollection | |
array | $mappedAttributeImportRulesCollection | |
- Exceptions
-
- Returns
- boolean true - all required are mapped, otherwise false.
Definition at line 120 of file ImportRulesUtil.php.
static checkIfAnyAttributesAreDoubleMapped |
( |
|
$mappedAttributeImportRulesCollection | ) |
|
|
static |
Given an array of mapped attribute rules, determine if any of the mapped rules overlap in which attributes they map to. This can happen if a derived attribute type contains multiple model attributes. If that derived type is mapped to one column, and one of those individual model attributes is also mapped to a different column, then this is considered an overlap and is not allowed. If this is found an exception is thrown.
- Parameters
-
array | $mappedAttributeImportRulesCollection | |
- Exceptions
-
- Returns
- null;
Definition at line 168 of file ImportRulesUtil.php.
The documentation for this class was generated from the following file: