Class humhub\modules\notification\targets\MailTarget

Inheritancehumhub\modules\notification\targets\MailTarget » humhub\modules\notification\targets\BaseTarget » yii\base\BaseObject

Public Methods

Hide inherited methods

MethodDescriptionDefined By
acknowledge() Used to acknowledge the seding/processing of the given $notification. humhub\modules\notification\targets\BaseTarget
getId() Static access to the target id. humhub\modules\notification\targets\BaseTarget
getRenderer() humhub\modules\notification\targets\BaseTarget
getSettingKey() Returns the setting key for this target of the given $category. humhub\modules\notification\targets\BaseTarget
getTitle() humhub\modules\notification\targets\MailTarget
handle() Used to handle a BaseNotification for a given $user. humhub\modules\notification\targets\MailTarget
init() humhub\modules\notification\targets\BaseTarget
isAcknowledged() humhub\modules\notification\targets\BaseTarget
isActive() Some BaseTargets may need to be activated first or require a certain permission in order to be used. humhub\modules\notification\targets\MailTarget
isCategoryEnabled() Returns the enabled setting of this target for the given $category. humhub\modules\notification\targets\BaseTarget
isEditable() Checks if the settings for this target are editable. humhub\modules\notification\targets\BaseTarget
isEnabled() Checks if the given $notification is enabled for this target. humhub\modules\notification\targets\BaseTarget
send() Used to process a $notification for the given $user. humhub\modules\notification\targets\BaseTarget
sendBulk() Used for handling the given $notification for multiple $users. humhub\modules\notification\targets\BaseTarget

Property Details

$defaultSetting public property
public boolean $defaultSetting true
$id public property
public string $id 'email'
$view public property

Notification mail layout.

public array $view = ['html' => '@notification/views/mails/wrapper''text' => '@notification/views/mails/plaintext/wrapper']

Method Details

getTitle() public method

public string getTitle ( )
return string

Human readable title for views.

handle() public method

Used to handle a BaseNotification for a given $user.

The BaseTarget can handle the notification for example by pushing a Job to a Queue or directly handling the notification.

public void handle ( humhub\modules\notification\components\BaseNotification $notification, humhub\modules\user\models\User $recipient )
$notification humhub\modules\notification\components\BaseNotification
isActive() public method

Some BaseTargets may need to be activated first or require a certain permission in order to be used.

This function checks if this target is active for the given user. If no user is given this function will determine if the target is globaly active or deactivated.

If a subclass does not overwrite this function it will be activated for all users by default.

public void isActive ( humhub\modules\user\models\User $user null )
$user humhub\modules\user\models\User