diff options
Diffstat (limited to 'doc/hook')
-rw-r--r-- | doc/hook/build_pagehead.bb | 2 | ||||
-rw-r--r-- | doc/hook/daemon_addon.bb | 15 | ||||
-rw-r--r-- | doc/hook/get_default_export_sections | 10 | ||||
-rw-r--r-- | doc/hook/identity_basic_export.bb | 9 |
4 files changed, 36 insertions, 0 deletions
diff --git a/doc/hook/build_pagehead.bb b/doc/hook/build_pagehead.bb new file mode 100644 index 000000000..8fc3486c7 --- /dev/null +++ b/doc/hook/build_pagehead.bb @@ -0,0 +1,2 @@ +[b]build_pagehead[/b] + diff --git a/doc/hook/daemon_addon.bb b/doc/hook/daemon_addon.bb new file mode 100644 index 000000000..b60b25748 --- /dev/null +++ b/doc/hook/daemon_addon.bb @@ -0,0 +1,15 @@ +[h2]daemon_addon[/h2] + + +A foreground plugin can create a background process by invoking: + +[code] +\Zotlabs\Daemon\Master::Summon([ 'Addon', 'myplugin', 'something' ]); +[/code] + +This starts up a background process (called 'Addon') specifically for addons to use. + +Then if your plugin is also catching the daemon_addon hook that handler will be called with the +argv array of the background process. In this case [ 'myplugin', 'something' ]; + +We recommend using this convention so that plugins can share this hook without causing conflicts; that is check to see if your plugin is the first array argument and if not, return from the hook. Otherwise you can initiate background processing. Something to remember is that during background processes there is no session. You are detached from the web page which created the background process.
\ No newline at end of file diff --git a/doc/hook/get_default_export_sections b/doc/hook/get_default_export_sections new file mode 100644 index 000000000..09b146643 --- /dev/null +++ b/doc/hook/get_default_export_sections @@ -0,0 +1,10 @@ +[h3]get_default_export_sections[/h3] + +The get_default_export_sections call returns the basic functional groups of data to export using channel_export_basic(). + +The hook is passed an array + [ + 'sections' => [ 'channel', 'connections', 'config', 'apps', 'chatrooms', 'events', 'webpages', 'mail', 'wikis' ] + ] + +If you desire the export to contain three months of items, add 'items' to the 'sections' array diff --git a/doc/hook/identity_basic_export.bb b/doc/hook/identity_basic_export.bb index 3f4e88799..71329ba1e 100644 --- a/doc/hook/identity_basic_export.bb +++ b/doc/hook/identity_basic_export.bb @@ -1 +1,10 @@ [h2]identity_basic_export[/h2] + +Called when exporting data for a channel +Passed array contains + + [ + 'channel_id' => channel_id being exported + 'sections' => array of functional export sections which are being exported + 'data' => the export data array which has been generated + ] |