Files
Phraseanet/lib/Alchemy/Phrasea/Notification/Mail/MailReport.php
Aina Sitraka 58985edf62 some fix (#4269)
PHRAS-3823:  "report" color in  email, email subject, and files naming
2023-03-13 19:03:17 +01:00

61 lines
1.1 KiB
PHP

<?php
namespace Alchemy\Phrasea\Notification\Mail;
use Alchemy\Phrasea\Exception\LogicException;
class MailReport extends AbstractMail
{
const MAIL_SKIN = 'report';
private $reportName;
public function setReportName($reportName)
{
$this->reportName = $reportName;
}
/**
* @inheritDoc
*/
public function getSubject()
{
if (!$this->reportName) {
throw new LogicException('You must set the report name');
}
return $this->app->trans("mail:: report - %instance% - %reportName%", [
'%instance%' => $this->getPhraseanetTitle(),
'%reportName%' => $this->reportName
],
'messages', $this->getLocale());
}
/**
* @inheritDoc
*/
public function getMessage()
{
return $this->app->trans("mail:: report messages", [], 'messages', $this->getLocale());
}
/**
* @inheritDoc
*/
public function getButtonText()
{
}
/**
* @inheritDoc
*/
public function getButtonURL()
{
}
public function getMailSkin()
{
return self::MAIL_SKIN;
}
}