Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
9 / 9
InProgressNotification
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
9 / 9
 category
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 html
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
4 / 4
 getMailSubject
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
4 / 4
<?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\notification\components\BaseNotification;
use humhub\modules\space\models\Space;
use yii\helpers\Html;
/**
 * Notifies an admin about reported content
 *
 * @since 0.5
 */
class InProgressNotification extends BaseNotification
{
    /**
     * @inheritdoc
     */
    public $suppressSendToOriginator = true;
    /**
     * @inheritdoc
     */
    public $moduleId = 'tasks';
    /**
     * @inheritdoc
     */
    public $viewName = "taskNotification";
    /**
     * @inheritdoc
     */
    public function category()
    {
        return new TaskNotificationCategory();
    }
    public function html()
    {
        return Yii::t('TasksModule.notifications', '{userName} started working on Task {task} in space {spaceName}.', [
            '{userName}' => Html::tag('strong', Html::encode($this->originator->displayName)),
            '{task}' => Html::tag('strong', Html::encode($this->getContentInfo($this->source, false))),
            '{spaceName}' => Html::tag('strong', Html::encode($this->source->content->container->displayName))
        ]);
    }
    /**
     * @inheritdoc
     */
    public function getMailSubject()
    {
        return Yii::t('TasksModule.notifications', '{userName} started working on Task {task} in space {spaceName}.', [
            '{userName}' => Html::encode($this->originator->displayName),
            '{task}' => Html::encode($this->getContentInfo($this->source, false)),
            '{spaceName}' => Html::encode($this->source->content->container->displayName)
        ]);
    }
}