PHP Class Newscoop\Services\EmailService

Show file Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$container Symfony\Component\DependencyInjection\Container

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\Container $container )
send ( string $placeholder, string $message, string $to, string | null $from = null, string | null $attachmentDir = null ) : void Send email
sendCommentNotification ( Comment $comment, Article $article, array $authors, User $user = null ) : void Send comment notification
sendConfirmationToken ( User $user ) : void | Exception Send to user email confirmation token
sendPasswordRestoreToken ( User $user ) : void | Exception Send password restore token
sendUserEmail ( string $from, string $to, string $subject, string $message ) : void Send user message from other user

Private Methods

Method Description
getModeratorEmailIfModerationEnabled ( Publication $publication, $user = null )

Method Details

__construct() public method

public __construct ( Symfony\Component\DependencyInjection\Container $container )
$container Symfony\Component\DependencyInjection\Container

send() public method

Send email
public send ( string $placeholder, string $message, string $to, string | null $from = null, string | null $attachmentDir = null ) : void
$placeholder string
$message string
$to string
$from string | null
$attachmentDir string | null
return void

sendCommentNotification() public method

Send comment notification
public sendCommentNotification ( Comment $comment, Article $article, array $authors, User $user = null ) : void
$comment Newscoop\Entity\Comment
$article Newscoop\Entity\Article
$authors array
$user Newscoop\Entity\User
return void

sendConfirmationToken() public method

Send to user email confirmation token
public sendConfirmationToken ( User $user ) : void | Exception
$user Newscoop\Entity\User
return void | Exception

sendPasswordRestoreToken() public method

Send password restore token
public sendPasswordRestoreToken ( User $user ) : void | Exception
$user Newscoop\Entity\User
return void | Exception

sendUserEmail() public method

Send user message from other user
public sendUserEmail ( string $from, string $to, string $subject, string $message ) : void
$from string
$to string
$subject string
$message string
return void

Property Details

$container protected property

protected Container,Symfony\Component\DependencyInjection $container
return Symfony\Component\DependencyInjection\Container