Ejemplo n.º 1
0
 /**
  * Set the priority of the mail message
  *
  * When not in settings, the value will be 3. If the priority is configured,
  * but too big, it will be set to 5, which means very low.
  *
  * @return void
  */
 protected function setPriority()
 {
     $priority = 3;
     if ($this->typoScript['priority']) {
         $priority = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->typoScript['priority'], 1, 5);
     }
     $this->mailMessage->setPriority($priority);
 }
Ejemplo n.º 2
0
 /**
  * Set the priority of the mail message
  *
  * When not in settings, the value will be 3. If the priority is configured,
  * but too big, it will be set to 5, which means very low.
  *
  * @return void
  */
 protected function setPriority()
 {
     $priority = 3;
     if (isset($this->typoScript['priority'])) {
         $priorityFromTs = $this->formUtility->renderItem($this->typoScript['priority.'], $this->typoScript['priority']);
     }
     if (!empty($priorityFromTs)) {
         $priority = MathUtility::forceIntegerInRange($priorityFromTs, 1, 5);
     }
     $this->mailMessage->setPriority($priority);
 }
Ejemplo n.º 3
0
 /**
  * Add mail priority
  *
  * @param MailMessage $message
  * @return MailMessage
  */
 protected function addPriority(MailMessage $message)
 {
     $priorityValue = (int) $this->settings[$this->type]['overwrite']['priority'];
     if ($priorityValue > 0) {
         $message->setPriority($priorityValue);
     }
     return $message;
 }