All Data Structures Functions Variables Pages
Public Member Functions | Protected Member Functions
ImportDefaultController Class Reference
Inheritance diagram for ImportDefaultController:
ZurmoBaseController Controller ImportDemoController

Public Member Functions

 filters ()
 
 actionIndex ()
 
 actionStep1 ()
 
 actionStep2 ($id)
 
 actionStep3 ($id)
 
 actionStep4 ($id)
 
 actionStep5 ($id, $step=null, $pageSize=null)
 
 actionStep6 ($id, $step=null, $pageSize=null)
 
 actionMappingRulesEdit ($id, $attributeIndexOrDerivedType, $columnName, $columnType)
 
 actionMappingAddExtraMappingRow ($id, $columnCount)
 
 actionSampleRow ($id)
 
 actionUploadFile ($filesVariableName, $id)
 
 actionDeleteFile ($id)
 
 actionUpdate ($id, $attribute, $item, $value)
 
- Public Member Functions inherited from ZurmoBaseController
 filters ()
 
 resolveModuleClassNameForFilters ()
 
 __construct ($id, $module=null)
 
- Public Member Functions inherited from Controller
 __construct ($id, $module=null)
 
 resolveAndGetModuleId ()
 
 renderBeginWidget ($className, $properties=array())
 
 renderEndWidget ()
 
 makeRedBeanDataProviderByDataCollection ($searchModel, $pageSize, $stateMetadataAdapterClassName=null, $dataCollection=null)
 

Protected Member Functions

 resolveFilteredByStatus ()
 
 resolveResettingPageOnCompletion (ImportDataProvider $dataProvider)
 
 makeImportCompleteView (Import $import, ImportWizardForm $importWizardForm, ImportDataProvider $dataProvider, $setCurrentPageToFirst=false, $pageSize=null)
 
 attemptToValidateImportWizardFormAndSave ($importWizardForm, $import, $redirectAction)
 
 makeDataProviderForSampleRow ($import, $firstRowIsHeaderRow)
 
 getImportPageView ($progressBarAndStepsView, $importView)
 
- Protected Member Functions inherited from ZurmoBaseController
 makeActionBarSearchAndListView ($searchModel, $dataProvider, $actionBarViewClassName= 'SecuredActionBarForSearchAndListView', $viewPrefixName=null, $activeActionElementType=null, IntroView $introView=null)
 
 makeActionBarAndListView ($listModel, $dataProvider, $actionBarViewClassName= 'ActionBarForSearchAndListView', $viewPrefixName=null, $activeActionElementType=null)
 
 makeListView (SearchForm $searchForm, $dataProvider, $listViewClassName=null)
 
 resolveSearchDataProvider ($searchModel, $pageSize, $stateMetadataAdapterClassName=null, $stickySearchKey=null, $setSticky=true)
 
 resolveToTriggerOnSearchEvents ($listModelClassName)
 
 getDataProviderByResolvingSelectAllFromGet ($searchModel, $pageSize, $userId, $stateMetadataAdapterClassName=null, $stickySearchKey=null)
 
 processMassEdit ($pageSize, $activeAttributes, $selectedRecordCount, $pageViewClassName, $listModel, $title, $dataProvider=null)
 
 processMassEditProgressSave ($modelClassName, $pageSize, $title, $dataProvider=null)
 
 makeMassEditProgressView ($model, $page, $selectedRecordCount, $start, $pageSize, $title, $skipCount)
 
 saveMassEdit ($modelClassName, $postVariableName, $selectedRecordCount, $dataProvider, $page, $pageSize)
 
 processMassDelete ($pageSize, $activeAttributes, $selectedRecordCount, $pageViewClassName, $listModel, $title, $dataProvider=null, $redirectUrl=null)
 
 processMassDeleteProgress ($modelClassName, $pageSize, $title, $dataProvider=null)
 
 makeMassDeleteProgressView ($model, $page, $selectedRecordCount, $start, $pageSize, $title, $skipCount)
 
 doMassDelete ($modelClassName, $postVariableName, $selectedRecordCount, $dataProvider, $page, $pageSize)
 
 resolveReturnUrlForMassAction ()
 
 attemptToSaveModelFromPost ($model, $redirectUrlParams=null, $redirect=true, $returnOnValidate=false)
 
 actionAfterSuccessfulModelSave ($model, $modelToStringValue, $redirectUrlParams=null)
 
 redirectAfterSaveModel ($modelId, $urlParams=null)
 
 triggerMassAction ($modelClassName, $searchForm, $pageView, $title, $searchView=null, $stateMetadataAdapterClassName=null, $useModuleClassNameForItemLabel=true)
 
 massActionProgress ($model, $pageSize, $title, $actionId, $dataProvider)
 
 massAction ($model, $pageSize, $title, $pageView, $actionId, $dataProvider, $useModuleClassNameForItemLabel=true)
 
 processMassAction ($pageSize, $selectedRecordCount, $pageViewClassName, $listModel, $title, $actionId, $dataProvider=null)
 
 makeMassActionView ($model, $activeAttributes, $selectedRecordCount, $title, $actionId, $useModuleClassNameForItemLabel=true)
 
 processMassActionProgress ($listModel, $pageSize, $title, $actionId, $dataProvider=null)
 
 makeMassActionProgressView ($model, $page, $selectedRecordCount, $start, $pageSize, $title, $skipCount, $actionId)
 
 resolveParamsForMassProgressView ()
 
 resolveActiveElementTypeForKanbanBoard (SearchForm $searchForm)
 
 resolveActiveElementTypeForKanbanBoardInDetailView ($detailsAndRelationsView)
 
 resolveKanbanBoardIsActiveByGetForDetailsView ($detailsAndRelationsView)
 
 beforeRedirect ($model)
 
 makeSearchAndListView ($searchModel, $moduleName, $dataProvider)
 
- Protected Member Functions inherited from Controller
 resolveKanbanBoardMetadataBeforeMakingDataProvider ($searchForm, &$metadata)
 
 resolveFilteredByMetadataBeforeMakingDataProvider ($searchForm, &$metadata)
 
 resolveMetadataBeforeMakingDataProvider (&$metadata)
 
 makeDetailsAndRelationsView ($model, $moduleClassName, $viewClassName, $redirectUrl, $breadCrumbView=null)
 
 resolveAdditionalParametersForDetailsAndRelationsView ($viewClassName)
 
 makeTitleBarAndEditAndDetailsView ($model, $renderType, $titleBarAndEditViewClassName= 'TitleBarAndEditAndDetailsView')
 
 makeEditAndDetailsView ($model, $renderType)
 
 makeTitleBarAndEditView ($model, $titleBarAndEditViewClassName)
 
 makeTitleBarAndDetailsView ($model, $titleBarAndDetailsViewClassName= 'TitleBarAndDetailsView')
 
 resolveActiveAttributesFromMassEditPost ()
 
 resolveActiveAttributesFromMassDeletePost ()
 
 makeMassEditView ($model, $activeAttributes, $selectedRecordCount, $title)
 
 makeMassDeleteView ($model, $activeAttributes, $selectedRecordCount, $title, $massDeleteViewClassName= 'MassDeleteView', $useModuleClassNameForItemLabel=true)
 
 getMassEditProgressStartFromGet ($getVariableName, $pageSize)
 
 getMassDeleteProgressStartFromGet ($getVariableName, $pageSize)
 
 attemptToValidateAjaxFromPost ($model, $postVariableName)
 
 getModelsToSave ($modelClassName, $dataProvider, $selectedRecordCount, $page, $pageSize)
 
 getModelsToDelete ($modelClassName, $dataProvider, $selectedRecordCount, $page, $pageSize)
 
 makeListMergeView ($model, $viewPrefix, $selectedList=array())
 

Additional Inherited Members

- Static Public Member Functions inherited from ZurmoBaseController
static getRightsFilterPath ()
 
- Data Fields inherited from ZurmoBaseController
const RIGHTS_FILTER_PATH = 'application.modules.zurmo.controllers.filters.RightsControllerFilter'
 
const REQUIRED_ATTRIBUTES_FILTER_PATH = 'application.modules.zurmo.controllers.filters.RequiredAttributesControllerFilter'
 
const ADMIN_VIEW_MOBILE_CHECK_FILTER_PATH = 'application.modules.zurmo.controllers.filters.AdminViewMobileCheckControllerFilter'
 
const ROOT_USER_ACCESS_FILTER_PATH = 'application.modules.zurmo.controllers.filters.RootUserAccessControllerFilter'
 
- Static Protected Member Functions inherited from ZurmoBaseController
static resolvePageValueForMassAction ($modelClassName)
 
static resolveViewIdByMassActionId ($actionId, $returnProgressViewName, $moduleName=null)
 
static applyGenericViewIdGenerationRules ($actionId)
 
static resolveTitleByMassActionId ($actionId)
 
static getZurmoControllerUtil ()
 
static getModelAndCatchNotFoundAndDisplayError ($modelClassName, $id)
 
static processModelsForMassAction ($model, $modelClassName, $selectedRecordCount, $dataProvider, $page, $pageSize, $insufficientPermissionSkipSavingUtil, $postModelClassName, $actionId)
 
static processModelsForMassActionWithoutScoring ($modelClassName, $selectedRecordCount, $dataProvider, $page, $pageSize, $insufficientPermissionSkipSavingUtil, $actionId)
 
static processModelsForMassEditAction ($postModelClassName, $model, $modelClassName, $selectedRecordCount, $dataProvider, $page, $pageSize, $insufficientPermissionSkipSavingUtil, $actionId)
 
static resolvePostDataByMassActionId ($actionId, $modelClassName=null)
 
static resolveSelectedRecordCountByMassActionId ($actionId, $dataProvider=null, $postData=array())
 
static resolveMassActionAlertMessage ($postVariableName, $actionId)
 
static resolvePageSizeByMassActionId ($actionId)
 
static toggleMuteScoringModelValueByMassActionId ($actionId, $mute=true)
 
static resolvePermissionOnSecurableItemByMassActionId ($actionId)
 
static processModelForMassDelete (&$model)
 
static resolveOffsetForDataProvider ($dataProvider, $actionId)
 
static processModelForMassEdit (&$model)
 
static resolveInsufficientPermissionSkipSavingUtilByMassActionId ($actionId)
 
static resolveProgressActionId ($actionId)
 
static resolveMassActionId ($actionId, $capitalizeFirst=true)
 
- Static Protected Member Functions inherited from Controller
static resolveDynamicSearchMetadata ($searchModel, $metadata, SearchAttributesDataCollection $dataCollection)
 
static resolveActiveAttributesFromPostForMassAction ($actionId)
 
static getSelectedRecordCountByResolvingSelectAllFromGet ($dataProvider, $countEmptyStringAsElement=true)
 
static getMassActionProgressStartFromGet ($pageVariableName, $pageSize)
 
static getModelsToUpdate ($modelClassName, $dataProvider, $selectedRecordCount, $page, $pageSize)
 
static getMassEditAlertMessage ($postVariableName)
 
static resolveMassEditAlertMessage ($postVariableName)
 

Detailed Description

Definition at line 37 of file DefaultController.php.

Member Function Documentation

actionStep1 ( )

Step 1. Select the module to import data into.

Definition at line 58 of file DefaultController.php.

actionStep2 (   $id)

Step 2. Upload the csv to import.

Definition at line 94 of file DefaultController.php.

actionStep3 (   $id)

Step 3. Decide permissions for upload.

Definition at line 145 of file DefaultController.php.

actionStep4 (   $id)

Step 4. Import mapping

Definition at line 166 of file DefaultController.php.

actionStep5 (   $id,
  $step = null,
  $pageSize = null 
)

Step 5. Analyze data in a sequential process.

Parameters
integerid - Import model id
string$step

Definition at line 254 of file DefaultController.php.

actionStep6 (   $id,
  $step = null,
  $pageSize = null 
)

Step 6. Sanitize and create/update models using a sequential process.

Parameters
integer$id- Import model id
null | string$step
null | int$pageSize

Definition at line 363 of file DefaultController.php.

actionMappingRulesEdit (   $id,
  $attributeIndexOrDerivedType,
  $columnName,
  $columnType 
)

Step 4 ajax process. When you change the attribute dropdown, new mapping rule information is retrieved and displayed in the user interface.

Definition at line 466 of file DefaultController.php.

actionMappingAddExtraMappingRow (   $id,
  $columnCount 
)

Step 4 ajax process. When you click the 'Add Field' button in the user interface, this ajax action is called and makes an extra row to display for mapping.

Definition at line 496 of file DefaultController.php.

actionUploadFile (   $filesVariableName,
  $id 
)

Ajax action called from user interface to upload an import file. If a file for this import model is already uploaded, then this will overwrite it.

Parameters
string$filesVariableName
string$id(should be integer, but php type casting doesn't work so well)

Definition at line 549 of file DefaultController.php.

actionDeleteFile (   $id)

Ajax action to delete an import file that was uploaded. Will drop the temporary table created for the import.

Parameters
string$id

Definition at line 627 of file DefaultController.php.

attemptToValidateImportWizardFormAndSave (   $importWizardForm,
  $import,
  $redirectAction 
)
protected

Generic method that is used by all steps to validate and saved the ImportWizardForm and Import model.

Parameters
object$importWizardForm
object$import
string$redirectAction

Definition at line 639 of file DefaultController.php.

makeDataProviderForSampleRow (   $import,
  $firstRowIsHeaderRow 
)
protected
Parameters
Import$import
bool$firstRowIsHeaderRow
Returns
ImportDataProvider

Definition at line 666 of file DefaultController.php.


The documentation for this class was generated from the following file:
Generated on Wed Feb 19 2020 07:10:42