MappingFormLayoutUtil Class Reference

Public Member Functions

 __construct ($mappingFormModelClassName, $form, $mappableAttributeIndicesAndDerivedTypesForImportColumns, $mappableAttributeIndicesAndDerivedTypesForExtraColumns)
 getMappableAttributeIndicesAndDerivedTypesForImportColumns ()
 getMappableAttributeIndicesAndDerivedTypesForExtraColumns ()
 renderAttributeAndColumnTypeContent ($columnName, $columnType, $attributeIndexOrDerivedType, $ajaxOnChangeUrl)
 renderHeaderColumnContent ($columnName, $headerValue)
 renderImportColumnContent ($columnName, $sampleValue)
 renderMappingRulesElements ($columnName, $attributeIndexOrDerivedType, $importRulesType, $columnType, $mappingRuleFormsAndElementTypes)

Static Public Member Functions

static renderMappingDataMetadataWithRenderedElements ($metadata)
static resolveSampleColumnIdByColumnName ($columnName)
static getSampleColumnHeaderId ()
static renderChoppedStringContent ($string)

Protected Member Functions

 renderAttributeDropDownContent ($columnName, $columnType, $attributeIndexOrDerivedType, $ajaxOnChangeUrl)
 renderColumnTypeContent ($columnName, $columnType, $attributeIndexOrDerivedType)
 renderAttributeDropDownOnChangeScript ($id, $columnName, $columnType, $ajaxOnChangeUrl)

Static Protected Member Functions

static getMappingRulesDivIdByColumnName ($columnName)

Protected Attributes

 $mappingFormModelClassName
 $form
 $mappableAttributeIndicesAndDerivedTypesForImportColumns
 $mappableAttributeIndicesAndDerivedTypesForExtraColumns

Detailed Description

Utility helper class for rendering the content for the

See also:
ImportWizardMappingView and
ImportWizardMappingExtraColumnView. This class helps to separate the logic for rendering content for the inputs on these views, so they can be reused more easily.

Definition at line 42 of file MappingFormLayoutUtil.php.


Constructor & Destructor Documentation

__construct ( mappingFormModelClassName,
form,
mappableAttributeIndicesAndDerivedTypesForImportColumns,
mappableAttributeIndicesAndDerivedTypesForExtraColumns 
)
Parameters:
string $mappingFormModelClassName
ZurmoActiveForm $form
array $mappableAttributeIndicesAndDerivedTypesForImportColumns
array $mappableAttributeIndicesAndDerivedTypesForExtraColumns

Definition at line 62 of file MappingFormLayoutUtil.php.


Member Function Documentation

getMappableAttributeIndicesAndDerivedTypesForImportColumns (  ) 

Used for testing purposes.

Definition at line 80 of file MappingFormLayoutUtil.php.

getMappableAttributeIndicesAndDerivedTypesForExtraColumns (  ) 

Used for testing purposes.

Definition at line 88 of file MappingFormLayoutUtil.php.

renderAttributeAndColumnTypeContent ( columnName,
columnType,
attributeIndexOrDerivedType,
ajaxOnChangeUrl 
)
Parameters:
string $columnName
string $columnType
string $attributeIndexOrDerivedType
string $ajaxOnChangeUrl
Returns:
string

Definition at line 100 of file MappingFormLayoutUtil.php.

renderHeaderColumnContent ( columnName,
headerValue 
)
Parameters:
string $columnName
string $headerValue
Returns:
string

Definition at line 175 of file MappingFormLayoutUtil.php.

renderImportColumnContent ( columnName,
sampleValue 
)
Parameters:
string $columnName
string $sampleValue
Returns:
string

Definition at line 188 of file MappingFormLayoutUtil.php.

renderMappingRulesElements ( columnName,
attributeIndexOrDerivedType,
importRulesType,
columnType,
mappingRuleFormsAndElementTypes 
)
Parameters:
string $columnName
string $attributeIndexOrDerivedType
string $importRulesType
string $columnType
array $mappingRuleFormsAndElementTypes
Returns:
string

Definition at line 204 of file MappingFormLayoutUtil.php.

static renderMappingDataMetadataWithRenderedElements ( metadata  )  [static]

Given an array of MappingFormLayoutUtil metadata, render the html rows and return this content as a string.

Parameters:
array $metadata
Returns:
string with the rendered content.

Definition at line 276 of file MappingFormLayoutUtil.php.

static resolveSampleColumnIdByColumnName ( columnName  )  [static]
Parameters:
string $columnName
Returns:
string

Definition at line 323 of file MappingFormLayoutUtil.php.

static renderChoppedStringContent ( string  )  [static]

Given a string, chop the string by 22 characters only displaying the first 22 characters with a '...'. Add a div with a title, so that if the user hovers over the text, it will show the entire string.

Parameters:
string $value
Returns:
string content

Definition at line 340 of file MappingFormLayoutUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Dec 13 07:10:26 2017