class DeletePostHandler

Traits

Properties

protected Dispatcher $events from DispatchEventsTrait
protected PostRepository $posts

Methods

dispatchEventsFor(object $entity, User $actor = null)

Dispatch all events for an entity.

__construct(Dispatcher $events, PostRepository $posts)

No description

handle(DeletePost $command)

No description

Details

dispatchEventsFor(object $entity, User $actor = null)

Dispatch all events for an entity.

Parameters

object $entity
User $actor

__construct(Dispatcher $events, PostRepository $posts)

Parameters

Dispatcher $events
PostRepository $posts

Post handle(DeletePost $command)

Parameters

DeletePost $command

Return Value

Post

Exceptions

PermissionDeniedException