本文整理汇总了PHP中Aimeos\MW\View\Iface::mail方法的典型用法代码示例。如果您正苦于以下问题:PHP Iface::mail方法的具体用法?PHP Iface::mail怎么用?PHP Iface::mail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aimeos\MW\View\Iface
的用法示例。
在下文中一共展示了Iface::mail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setViewParams
/**
* Sets the necessary parameter values in the view.
*
* @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
* @param array &$tags Result array for the list of tags that are associated to the output
* @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
* @return \Aimeos\MW\View\Iface Modified view object
*/
protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
{
/** client/html/email/logo
* Path to the logo image displayed in HTML e-mails
*
* The path can either be an absolute local path or an URL to a file on a
* remote server. If the file is stored on a remote server, "allow_url_fopen"
* must be enabled. See {@link http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen php.ini allow_url_fopen}
* documentation for details.
*
* @param string Absolute file system path or remote URL to the logo image
* @since 2014.03
* @category User
* @see client/html/email/from-email
*/
$file = $view->config('client/html/email/logo', 'client/html/themes/elegance/media/aimeos.png');
if (file_exists($file) && ($content = file_get_contents($file)) !== false) {
$finfo = new \finfo(FILEINFO_MIME_TYPE);
$mimetype = $finfo->file($file);
$view->htmlLogo = $view->mail()->embedAttachment($content, $mimetype, basename($file));
}
$path = $view->config('client/html/common/template/baseurl', 'client/html/themes/elegance');
$filepath = $path . DIRECTORY_SEPARATOR . 'common.css';
if (file_exists($filepath) && ($css = file_get_contents($filepath)) !== false) {
$view->htmlCss = $css;
}
return $view;
}