Roadiz events
The Roadiz node system implements several events, so you can create and inject your own event subscribers inside the Roadiz dispatcher.
To understand how the event dispatcher works, you should read the Symfony documentation first.
Nodes events
RZ\Roadiz\CoreBundle\Event\Node\NodeCreatedEventRZ\Roadiz\CoreBundle\Event\Node\NodeUpdatedEventRZ\Roadiz\CoreBundle\Event\Node\NodeDeletedEventRZ\Roadiz\CoreBundle\Event\Node\NodeUndeletedEventRZ\Roadiz\CoreBundle\Event\Node\NodeDuplicatedEventRZ\Roadiz\CoreBundle\Event\Node\NodePathChangedEventRZ\Roadiz\CoreBundle\Event\Node\NodeTaggedEvent: This event is triggered for tag and un-tag action.RZ\Roadiz\CoreBundle\Event\Node\NodeVisibilityChangedEvent: This event is triggered each time a node becomes visible or invisible.RZ\Roadiz\CoreBundle\Event\Node\NodeStatusChangedEvent: This event is triggered each time a node status changes.
Each node event object contains the current Node entity. You can get it using $event->getNode().
NodesSources events
Each RZ\Roadiz\CoreBundle\Event\NodesSourcesEvents object contains the current NodesSources entity. You can get it using $event->getNodeSource().
RZ\Roadiz\CoreBundle\Event\NodesSources\NodesSourcesCreatedEventRZ\Roadiz\CoreBundle\Event\NodesSources\NodesSourcesPreUpdatedEvent: This event is dispatched before the entity manager is flushed.RZ\Roadiz\CoreBundle\Event\NodesSources\NodesSourcesUpdatedEvent: This event is dispatched after the entity manager is flushed.RZ\Roadiz\CoreBundle\Event\NodesSources\NodesSourcesDeletedEventRZ\Roadiz\SolrBundle\Event\NodesSources\NodesSourcesIndexingEvent: This event type is dispatched during Solr indexing; it allows you to alter or improve your search-engine index according to your node-source type.TIP
Default search-engine Roadiz subscriber is located in SolrBundle:
RZ\Roadiz\SolrBundle\EventListener\SolariumSubscriber. This subscriber is useful to update or delete your Solr index documents against your node-source database.RZ\Roadiz\CoreBundle\Event\NodesSources\NodesSourcesPathGeneratingEvent: This event type is dispatched when the node router generates a path for your node-source using thepath()Twig method or the$this->urlGenerator->generate()controller method. The default subscriber will generate the complete hierarchical path for any node-source using its identifier (available URL alias or node name).
Tags events
RZ\Roadiz\CoreBundle\Event\Tag\TagCreatedEventRZ\Roadiz\CoreBundle\Event\Tag\TagUpdatedEventRZ\Roadiz\CoreBundle\Event\Tag\TagDeletedEvent
Each tag event object contains the current Tag entity. You can get it using $event->getTag().
Folders events
RZ\Roadiz\CoreBundle\Event\Folder\FolderCreatedEventRZ\Roadiz\CoreBundle\Event\Folder\FolderUpdatedEventRZ\Roadiz\CoreBundle\Event\Folder\FolderDeletedEvent
Each folder event object contains the current Folder entity. You can get it using $event->getFolder().
Translations events
RZ\Roadiz\CoreBundle\Event\Translation\TranslationCreatedEventRZ\Roadiz\CoreBundle\Event\Translation\TranslationUpdatedEventRZ\Roadiz\CoreBundle\Event\Translation\TranslationDeletedEvent
Each translation event object contains the current Translation entity. You can get it using $event->getTranslation().
UrlAlias events
RZ\Roadiz\CoreBundle\Event\UrlAlias\UrlAliasCreatedEventRZ\Roadiz\CoreBundle\Event\UrlAlias\UrlAliasUpdatedEventRZ\Roadiz\CoreBundle\Event\UrlAlias\UrlAliasDeletedEvent
Each URL alias event object contains the current UrlAlias entity. You can get it using $event->getUrlAlias().
Redirections events
RZ\Roadiz\CoreBundle\Event\Redirection\PostCreatedRedirectionEventRZ\Roadiz\CoreBundle\Event\Redirection\PostDeletedRedirectionEventRZ\Roadiz\CoreBundle\Event\Redirection\PostUpdatedRedirectionEvent
Each redirection event object contains the current Redirection entity. You can get it using $event->getRedirection().
Realms events
RZ\Roadiz\CoreBundle\Event\Realm\NodeJoinedRealmEventRZ\Roadiz\CoreBundle\Event\Realm\NodeLeftRealmEvent
Each realm event object contains the current RealmNode data transfer object. You can get it using $event->getRealmNode().
User events
RZ\Roadiz\CoreBundle\Event\User\UserCreatedEventRZ\Roadiz\CoreBundle\Event\User\UserDeletedEventRZ\Roadiz\CoreBundle\Event\User\UserDisabledEventRZ\Roadiz\CoreBundle\Event\User\UserEnabledEventRZ\Roadiz\CoreBundle\Event\User\UserJoinedGroupEventRZ\Roadiz\CoreBundle\Event\User\UserLeavedGroupEventRZ\Roadiz\CoreBundle\Event\User\UserPasswordChangedEventRZ\Roadiz\CoreBundle\Event\User\UserUsernameChangedEventRZ\Roadiz\CoreBundle\Event\User\UserUpdatedEvent
Each user event object contains the current User entity. You can get it using $event->getUser().
Custom Form Answers events
RZ\Roadiz\CoreBundle\Event\CustomFormAnswer\CustomFormAnswerSubmittedEvent: After a custom form answer has been submitted and saved.
