本文整理汇总了PHP中Zend\View\Renderer\PhpRenderer::partial方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpRenderer::partial方法的具体用法?PHP PhpRenderer::partial怎么用?PHP PhpRenderer::partial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\View\Renderer\PhpRenderer
的用法示例。
在下文中一共展示了PhpRenderer::partial方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendRecord
/**
* 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);
}
示例2: attachmentsForm
/**
* 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]);
}