mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-15 01:34:14 +00:00
3ab0dcb9e6
Templated hooks we almost completely useless, so we get rid of them. This allows us to get rid entirely of hook names and hook indexes, which makes the whole implementation much simpler. Hook removal (with `clear_all`) is achieved thanks to weak references.
15 lines
655 B
ReStructuredText
15 lines
655 B
ReStructuredText
.. _actions:
|
|
|
|
=======
|
|
Actions
|
|
=======
|
|
|
|
Actions are one of the two types of hooks (the other being :ref:`filters`) that can be used to extend Tutor. Each action represents an event that can occur during the application life cycle. Each action has a name, and callback functions can be attached to it. When an action is triggered, these callback functions are called in sequence. Each callback function can trigger side effects, independently from one another.
|
|
|
|
.. autoclass:: tutor.core.hooks.Action
|
|
:members:
|
|
|
|
.. The following are only to ensure that the docs build without warnings
|
|
.. class:: tutor.core.hooks.actions.T
|
|
.. class:: tutor.types.Config
|