Neos\Neos\Controller\Module\AbstractModuleController::initializeAction PHP Method

initializeAction() protected method

protected initializeAction ( ) : void
return void
    protected function initializeAction()
    {
        $this->moduleConfiguration = $this->request->getInternalArgument('__moduleConfiguration');
    }

Usage Example

 /**
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $translationHelper = new TranslationHelper();
     $this->setTitle($translationHelper->translate($this->moduleConfiguration['label']) . ' :: ' . $translationHelper->translate(str_replace('label', 'action.', $this->moduleConfiguration['label']) . $this->request->getControllerActionName()));
     if ($this->arguments->hasArgument('user')) {
         $propertyMappingConfigurationForUser = $this->arguments->getArgument('user')->getPropertyMappingConfiguration();
         $propertyMappingConfigurationForUserName = $propertyMappingConfigurationForUser->forProperty('user.name');
         $propertyMappingConfigurationForPrimaryAccount = $propertyMappingConfigurationForUser->forProperty('user.primaryAccount');
         $propertyMappingConfigurationForPrimaryAccount->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_TARGET_TYPE, Account::class);
         /** @var PropertyMappingConfiguration $propertyMappingConfiguration */
         foreach (array($propertyMappingConfigurationForUser, $propertyMappingConfigurationForUserName, $propertyMappingConfigurationForPrimaryAccount) as $propertyMappingConfiguration) {
             $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, true);
         }
     }
     $this->currentUser = $this->userService->getCurrentUser();
 }
All Usage Examples Of Neos\Neos\Controller\Module\AbstractModuleController::initializeAction