Files
Phraseanet/lib/Alchemy/Phrasea/Notification/Mail/MailInfoValidationReminder.php
2014-01-06 15:28:12 +01:00

70 lines
1.4 KiB
PHP

<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2014 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Phrasea\Notification\Mail;
use Alchemy\Phrasea\Exception\LogicException;
class MailInfoValidationReminder extends AbstractMailWithLink
{
/** @var string */
private $title;
/**
* Sets the title of the validation to remind
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* {@inheritdoc}
*/
public function getSubject()
{
if (!$this->title) {
throw new LogicException('You must set an title before calling getSubject');
}
return sprintf(_("Reminder : validate '%s'"), $this->title);
}
/**
* {@inheritdoc}
*/
public function getMessage()
{
return sprintf(
_('Il ne vous reste plus que %d jours pour terminer votre validation'),
$this->app['phraseanet.registry']->get('GV_validation_reminder')
);
}
/**
* {@inheritdoc}
*/
public function getButtonText()
{
return _('Start validation');
}
/**
* {@inheritdoc}
*/
public function getButtonURL()
{
return $this->url;
}
}