Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Subscribed event to send mail not working #37

@ruddhani

Description

@ruddhani

I have implemented 02 routes from draft creation to admin validation steps. Now I want to add a event subscriber so that after draft creation is reached, an email will trigger.

I am adding the event to subscribedEvents as:

public static function getSubscribedEvents()
    {
        return array(
            'post_publication.draft_created.reached' => array(
                'handleDraftCreated',
            ),
        );
    }

But unfortunately the handleDraftCreated function never called:

public function handleDraftCreated(StepEvent $event)
    {
        echo "handleDraftCreated called";
    }

Anything I am missing here, need help, thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions