Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 17 |
RemindEnd | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 17 |
category | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
html | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 7 |
|||
getMailSubject | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 7 |
<?php | |
/** | |
* @link https://www.humhub.org/ | |
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG | |
* @license https://www.humhub.com/licences | |
* | |
*/ | |
namespace humhub\modules\tasks\notifications; | |
use Yii; | |
use humhub\modules\tasks\models\Task; | |
use humhub\modules\notification\components\BaseNotification; | |
use humhub\modules\space\models\Space; | |
use yii\helpers\Html; | |
/** | |
* Notifies an admin about reported content | |
* | |
* @since 0.5 | |
*/ | |
class RemindEnd extends BaseNotification | |
{ | |
/** | |
* @inheritdoc | |
*/ | |
public $suppressSendToOriginator = false; | |
/** | |
* @inheritdoc | |
*/ | |
public $moduleId = 'tasks'; | |
/** | |
* @inheritdoc | |
*/ | |
public $viewName = "remind"; | |
/** | |
* @var Task | |
*/ | |
public $source; | |
/** | |
* @inheritdoc | |
*/ | |
public function category() | |
{ | |
return new TaskReminderCategory(); | |
} | |
public function html() | |
{ | |
return Yii::t('TasksModule.notifications', 'Task {task} in space {spaceName} ends at {dateTime}.', [ | |
'{task}' => Html::tag('strong', Html::encode($this->getContentInfo($this->source, false))), | |
'{spaceName}' => Html::tag('strong', Html::encode($this->source->content->container->displayName)), | |
'{dateTime}' => Html::encode($this->source->schedule->getFormattedEndDateTime()) | |
]); | |
} | |
/** | |
* @inheritdoc | |
*/ | |
public function getMailSubject() | |
{ | |
return Yii::t('TasksModule.notifications', 'Task {task} in space {spaceName} ends at {dateTime}.', [ | |
'{task}' => Html::encode($this->getContentInfo($this->source, false)), | |
'{spaceName}' => Html::encode($this->source->content->container->displayName), | |
'{dateTime}' => Html::encode($this->source->schedule->getFormattedEndDateTime()) | |
]); | |
} | |
} |