Пример #1
0
 /**
  * @test
  */
 public function setAccommodationForAccommodationSetsAccommodation()
 {
     $accommodationFixture = new \Sle\Accommodation\Domain\Model\Accommodation();
     $this->subject->setAccommodation($accommodationFixture);
     $this->assertAttributeEquals($accommodationFixture, 'accommodation', $this->subject);
 }
 /**
  * @param \Sle\Accommodation\Domain\Model\Reservation $newReservation
  * @return bool|null
  */
 private function sendNotificationMail(Reservation $newReservation)
 {
     $status = null;
     if (isset($this->settings['mail']['reservation']['enableSendMail']) && 1 == $this->settings['mail']['reservation']['enableSendMail']) {
         $mailSettings = $this->settings['mail']['reservation'];
         if (!empty($mailSettings['to'])) {
             $sendMail = new SendMail();
             $status = $sendMail->sendTemplateEmail($sendMail->getExplodedEmailAddresses((array) $mailSettings['to']), $sendMail->getExplodedEmailAddresses((array) $mailSettings['from']), LocalizationUtility::translate($mailSettings['subject'], $this->extensionName, array($newReservation->getAccommodation()->getName())), GeneralUtility::getFileAbsFileName($mailSettings['mailTemplate']), array('newReservation' => $newReservation), $sendMail->getExplodedEmailAddresses((array) $mailSettings['cc']), $sendMail->getExplodedEmailAddresses((array) $mailSettings['bcc']));
         }
     }
     return $status;
 }