Example #1
0
 /**
  * Send an email message representing a record.
  *
  * @param string                            $to      Recipient email address
  * @param string                            $from    Sender email address
  * @param string                            $msg     User notes to include in
  * message
  * @param \VuFind\RecordDriver\AbstractBase $record  Record being emailed
  * @param \Zend\View\Renderer\PhpRenderer   $view    View object (used to render
  * email templates)
  * @param string                            $subject Subject for email (optional)
  * @param string                            $cc      CC recipient (null for none)
  *
  * @throws MailException
  * @return void
  */
 public function sendRecord($to, $from, $msg, $record, $view, $subject = null, $cc = null)
 {
     if (null === $subject) {
         $subject = $this->getDefaultRecordSubject($record);
     }
     $body = $view->partial('Email/record.phtml', ['driver' => $record, 'to' => $to, 'from' => $from, 'message' => $msg]);
     return $this->send($to, $from, $subject, $body, $cc);
 }
Example #2
0
 /**
  * Render a form for adding/editing block attachments.
  *
  * @param PhpRenderer $view
  * @param SiteRepresentation $site
  * @param SiteBlockAttachmentRepresentation|null $block
  * @return string
  */
 public function attachmentsForm(PhpRenderer $view, SiteRepresentation $site, SitePageBlockRepresentation $block = null)
 {
     return $view->partial('common/attachments-form', ['block' => $block]);
 }