/**
  * Maps arguments delivered by the request object to the local controller arguments.
  *
  * @throws Exception\RequiredArgumentMissingException
  * @return void
  */
 protected function mapRequestArgumentsToControllerArguments()
 {
     if ($this->configurationManager->isFeatureEnabled('rewrittenPropertyMapper')) {
         foreach ($this->arguments as $argument) {
             $argumentName = $argument->getName();
             if ($this->request->hasArgument($argumentName)) {
                 $argument->setValue($this->request->getArgument($argumentName));
             } elseif ($argument->isRequired()) {
                 throw new \TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException('Required argument "' . $argumentName . '" is not set for ' . $this->request->getControllerObjectName() . '->' . $this->request->getControllerActionName() . '.', 1298012500);
             }
         }
     } else {
         // @deprecated since Extbase 1.4, will be removed two versions after Extbase 6.1
         $optionalPropertyNames = array();
         $allPropertyNames = $this->arguments->getArgumentNames();
         foreach ($allPropertyNames as $propertyName) {
             if ($this->arguments[$propertyName]->isRequired() === FALSE) {
                 $optionalPropertyNames[] = $propertyName;
             }
         }
         /** @var $validator ArgumentsValidator */
         $validator = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ArgumentsValidator');
         $this->deprecatedPropertyMapper->mapAndValidate($allPropertyNames, $this->request->getArguments(), $this->arguments, $optionalPropertyNames, $validator);
         $this->argumentsMappingResults = $this->deprecatedPropertyMapper->getMappingResults();
     }
 }
Beispiel #2
0
 /**
  * @param null $hashVars
  * @return string
  */
 private function getCacheID($hashVars = null)
 {
     $additionalHashVars = array('pid' => $GLOBALS['TSFE']->id, 'lang' => $GLOBALS['TSFE']->sys_language_uid, 'uid' => $this->_configurationManager->getContentObject()->data['uid']);
     if (!is_null($GLOBALS['TSFE']->fe_user->user)) {
         $additionalHashVars[] = $GLOBALS['TSFE']->fe_user->user['ses_id'];
     }
     $additionalHashVars = array_merge($additionalHashVars, $this->_request->getArguments());
     $hashVars = array_merge($additionalHashVars, $hashVars);
     $hashString = join('|', array_values($hashVars)) . join('|', array_keys($hashVars));
     return md5($hashString);
 }