-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
83 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ Extension system | |
:maxdepth: 2 | ||
|
||
themes/extending_roadiz | ||
roadiz-events/intro | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.. _events: | ||
|
||
Using Roadiz events | ||
=================== | ||
|
||
Roadiz node system implements several events. So you will be able to create | ||
and inject your own event subscribers inside *Roadiz* dispatcher. | ||
|
||
To understand how the event dispatcher works, you should read the | ||
`documentation from Symfony <http://symfony.com/doc/current/components/event_dispatcher/introduction.html>`_ before. | ||
|
||
|
||
Nodes events | ||
----------- | ||
|
||
``RZ\Roadiz\Core\Events\NodeEvents`` | ||
|
||
* *node.created:* ``NodeEvents::NODE_CREATED`` | ||
* *node.updated:* ``NodeEvents::NODE_UPDATED`` | ||
* *node.deleted:* ``NodeEvents::NODE_DELETED`` | ||
* *node.undeleted:* ``NodeEvents::NODE_UNDELETED`` | ||
* *node.tagged:* ``NodeEvents::NODE_TAGGED`` This event is triggered for tag and un-tag action. | ||
|
||
Every node events methods will accept a ``RZ\Roadiz\Core\Events\FilterNodeEvent`` object as argument. | ||
This object contains the current ``Node`` entity. You will get it using ``$event->getNode()``. | ||
|
||
NodesSources events | ||
------------------- | ||
|
||
``RZ\Roadiz\Core\Events\NodesSourcesEvents`` | ||
|
||
* *nodeSource.created:* ``NodesSourcesEvents::NODE_SOURCE_CREATED`` | ||
* *nodeSource.updated:* ``NodesSourcesEvents::NODE_SOURCE_UPDATED`` | ||
* *nodeSource.deleted:* ``NodesSourcesEvents::NODE_SOURCE_DELETED`` | ||
|
||
Every node-source events methods will accept a ``RZ\Roadiz\Core\Events\FilterNodesSourcesEvent`` object as argument. | ||
This object contains the current ``NodesSources`` entity. You will get it using ``$event->getNodeSource()``. | ||
|
||
.. note:: | ||
You will find a simple subscriber example in Roadiz back-office theme which is called ``Themes\Rozier\Events\SolariumSubscriber``. | ||
This subscriber is useful to update or delete your *Solr* index documents against your node-source database. | ||
|
||
Tags events | ||
----------- | ||
|
||
``RZ\Roadiz\Core\Events\TagEvents`` | ||
|
||
* *tag.created:* ``TagEvents::TAG_CREATED`` | ||
* *tag.updated:* ``TagEvents::TAG_UPDATED`` | ||
* *tag.deleted:* ``TagEvents::TAG_DELETED`` | ||
|
||
Every tag events methods will accept a ``RZ\Roadiz\Core\Events\FilterTagEvent`` object as argument. | ||
This object contains the current ``Tag`` entity. You will get it using ``$event->getTag()``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters