/**
  * Get storage pid from FlexForm, TypoScript or current page
  *
  * @return int
  */
 protected function getStoragePid()
 {
     $pid = (int) $this->settings['main.']['pid'];
     if (!empty($this->flexForm['main']['lDEF']['settings.flexform.main.pid']['vDEF'])) {
         $pid = (int) $this->flexForm['main']['lDEF']['settings.flexform.main.pid']['vDEF'];
     }
     if ($pid === 0) {
         $pid = (int) FrontendUtility::getCurrentPageIdentifier();
     }
     return $pid;
 }
예제 #2
0
 /**
  * Assign variables
  *
  * @return void
  */
 protected function assignMultipleActions()
 {
     if (empty($this->settings['single']['pid'])) {
         $this->settings['single']['pid'] = FrontendUtility::getCurrentPageIdentifier();
     }
     if (empty($this->settings['list']['pid'])) {
         $this->settings['list']['pid'] = FrontendUtility::getCurrentPageIdentifier();
     }
     if (empty($this->settings['edit']['pid'])) {
         $this->settings['edit']['pid'] = FrontendUtility::getCurrentPageIdentifier();
     }
     $this->view->assign('singlePid', $this->settings['single']['pid']);
     $this->view->assign('listPid', $this->settings['list']['pid']);
     $this->view->assign('editPid', $this->settings['edit']['pid']);
 }
예제 #3
0
 /**
  * Extend dataType with TSConfig
  *
  * @param string $fieldType
  * @param array $types
  * @return array
  */
 protected function extendTypeArrayWithTypoScriptTypes($fieldType, array $types)
 {
     $typoScript = BackendUtility::getPagesTSconfig(FrontendUtility::getCurrentPageIdentifier());
     $configuration = $typoScript['tx_powermail.']['flexForm.'];
     if (!empty($configuration['type.']['addFieldOptions.'][$fieldType . '.']['dataType'])) {
         $types[$fieldType] = (int) $configuration['type.']['addFieldOptions.'][$fieldType . '.']['dataType'];
     }
     return $types;
 }
 /**
  * Prepare variables for assignment in spam notifications
  *
  * @param Mail $mail
  * @return array
  */
 protected function getVariablesForSpamNotification(Mail $mail)
 {
     return array('mail' => $mail, 'pid' => FrontendUtility::getCurrentPageIdentifier(), 'calculatedMailSpamFactor' => $this->getCalculatedMailSpamFactor(true), 'messages' => $this->getMessages(), 'ipAddress' => !ConfigurationUtility::isDisableIpLogActive() ? GeneralUtility::getIndpEnv('REMOTE_ADDR') : '', 'time' => new \DateTime());
 }