NotificationTarget::getNotificationTargets PHP 메소드

getNotificationTargets() 공개 메소드

Return all the targets for this notification Values returned by this method are the ones for the alerts Can be updated by implementing the getAdditionnalTargets() method Can be overwitten (like dbconnection)
public getNotificationTargets ( $entity )
$entity the entity on which the event is raised
    function getNotificationTargets($entity)
    {
        if (Session::haveRight("config", UPDATE)) {
            $this->addTarget(Notification::GLOBAL_ADMINISTRATOR, __('Administrator'));
        }
        $this->addTarget(Notification::ENTITY_ADMINISTRATOR, __('Entity administrator'));
        $this->addProfilesToTargets();
        $this->addGroupsToTargets($entity);
    }