/**
  * Wrapper for \Neos\Flow\var_dump()
  *
  * @param string $title
  * @param boolean $typeOnly Whether only the type should be returned instead of the whole chain.
  * @return string debug string
  */
 public function render($title = null, $typeOnly = false)
 {
     $expressionToExamine = $this->renderChildren();
     if ($typeOnly === true && $expressionToExamine !== null) {
         $expressionToExamine = is_object($expressionToExamine) ? get_class($expressionToExamine) : gettype($expressionToExamine);
     }
     ob_start();
     \Neos\Flow\var_dump($expressionToExamine, $title);
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
 /**
  * Return the values in a human readable form
  *
  * @return void|string
  */
 public function evaluate()
 {
     $title = $this->getTitle();
     $plaintext = $this->getPlaintext();
     $debugData = array();
     foreach (array_keys($this->properties) as $key) {
         if (in_array($key, $this->ignoreProperties)) {
             continue;
         }
         $debugData[$key] = $this->tsValue($key);
     }
     if (count($debugData) === 0) {
         $debugData = null;
     } elseif (array_key_exists('value', $debugData) && count($debugData) === 1) {
         $debugData = $debugData['value'];
     }
     return \Neos\Flow\var_dump($debugData, $title, true, $plaintext);
 }
Example #3
0
 /**
  * Executes this finisher
  * @see AbstractFinisher::execute()
  *
  * @return void
  * @throws FinisherException
  */
 protected function executeInternal()
 {
     $formRuntime = $this->finisherContext->getFormRuntime();
     $standaloneView = $this->initializeStandaloneView();
     $standaloneView->assign('form', $formRuntime);
     $message = $standaloneView->render();
     $subject = $this->parseOption('subject');
     $recipientAddress = $this->parseOption('recipientAddress');
     $recipientName = $this->parseOption('recipientName');
     $senderAddress = $this->parseOption('senderAddress');
     $senderName = $this->parseOption('senderName');
     $replyToAddress = $this->parseOption('replyToAddress');
     $carbonCopyAddress = $this->parseOption('carbonCopyAddress');
     $blindCarbonCopyAddress = $this->parseOption('blindCarbonCopyAddress');
     $format = $this->parseOption('format');
     $testMode = $this->parseOption('testMode');
     if ($subject === null) {
         throw new FinisherException('The option "subject" must be set for the EmailFinisher.', 1327060320);
     }
     if ($recipientAddress === null) {
         throw new FinisherException('The option "recipientAddress" must be set for the EmailFinisher.', 1327060200);
     }
     if ($senderAddress === null) {
         throw new FinisherException('The option "senderAddress" must be set for the EmailFinisher.', 1327060210);
     }
     $mail = new \TYPO3\SwiftMailer\Message();
     $mail->setFrom(array($senderAddress => $senderName))->setTo(array($recipientAddress => $recipientName))->setSubject($subject);
     if ($replyToAddress !== null) {
         $mail->setReplyTo($replyToAddress);
     }
     if ($carbonCopyAddress !== null) {
         $mail->setCc($carbonCopyAddress);
     }
     if ($blindCarbonCopyAddress !== null) {
         $mail->setBcc($blindCarbonCopyAddress);
     }
     if ($format === self::FORMAT_PLAINTEXT) {
         $mail->setBody($message, 'text/plain');
     } else {
         $mail->setBody($message, 'text/html');
     }
     if ($testMode === true) {
         \Neos\Flow\var_dump(array('sender' => array($senderAddress => $senderName), 'recipient' => array($recipientAddress => $recipientName), 'replyToAddress' => $replyToAddress, 'carbonCopyAddress' => $carbonCopyAddress, 'blindCarbonCopyAddress' => $blindCarbonCopyAddress, 'message' => $message, 'format' => $format), 'E-Mail "' . $subject . '"');
     } else {
         $mail->send();
     }
 }