docs icon indicating copy to clipboard operation
docs copied to clipboard

Separating mailing logic by adding implementedEvents does not work as described.

Open suhaboncukcu opened this issue 10 years ago • 0 comments

In the documentation it is shown as:

public function implementedEvents()
{
    return [
        'Model.afterSave' => 'onRegistration'
    ];
}

public function onRegistration(Event $event, EntityInterface $entity, ArrayObject $options)
{
    if ($entity->isNew()) {
        $this->send('welcome', [$entity]);
    }
}

Mailer class never runs in this way. Sorry, I don't know how should this be.

suhaboncukcu avatar Apr 04 '16 14:04 suhaboncukcu