diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2014-08-19 00:56:37 +0200 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2014-08-19 00:56:37 +0200 |
commit | 3322a63df41f1b58d830aad0156160e6b532b5d7 (patch) | |
tree | 2ddc651dd75ae806499bb91bbeb5aaa4762598f5 /docs/source/pluginwriter | |
parent | 7610eb231e065ae59d07391b36717b79d4e58250 (diff) | |
download | mediagoblin-3322a63df41f1b58d830aad0156160e6b532b5d7.tar.lz mediagoblin-3322a63df41f1b58d830aad0156160e6b532b5d7.tar.xz mediagoblin-3322a63df41f1b58d830aad0156160e6b532b5d7.zip |
Add docs on collection_add_media hook.
Diffstat (limited to 'docs/source/pluginwriter')
-rw-r--r-- | docs/source/pluginwriter/hooks.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/source/pluginwriter/hooks.rst b/docs/source/pluginwriter/hooks.rst index 5272266c..4aa062e8 100644 --- a/docs/source/pluginwriter/hooks.rst +++ b/docs/source/pluginwriter/hooks.rst @@ -17,3 +17,19 @@ Documentation on Built-in Hooks =============================== This section explains built-in hooks to MediaGoblin. + + +What hooks are available? +========================= + +'collection_add_media' +---------------------- + +This hook is used by ``add_media_to_collection`` +in ``mediagoblin.user_pages.lib``. +It gets a ``CollectionItem`` as its argument. +It's the newly created item just before getting commited. +So the item can be modified by the hook, if needed. +Changing the session regarding this item is currently +undefined behaviour, as the SQL Session might contain other +things. |