!!Service Options
|
This is a list of the available service methods developers can register their own service functions to. These assume some knowledge of how ((bitweaverPackage|bitweaver Packages)) work:
|
|
+Note that these functions all take a $pObject and $pParamHash arguments where $pObject is the content object being worked on and $pParamHash is a hash of options. SQL functions may return a hash with select_sql, where_sql, join_sql and bind_vars set to effect the sql query being built. |
+ |
!!! Sql Extensions
|
;content_list_sql_function: Allows the extension of existing SQL while getList() is called. table aliases are kept constant throughout so you can easily join pertinent data to the existing SQL when getList() is called from any package. You can also insert some select_sql as well, to limit the selection critieria.
|
;content_load_sql_function: This is basically the same as content_list_sql_function but it's called during the load() process. the output should be virtually the same.
|
|
|
!!! Functions
|
+;content_load_function: This function is called during the load process of the content, i.e. while the page is being loaded before the display function. this is good for things that should happen early on but the sql function is called too soon. |
;content_display_function: This function is called during the displaying of the content, i.e. while the page is being loaded. this means, you can add more sophisticated queries and checks in here, if there is no possibility to do this with the SQL functions above.
|
;content_list_function: This function is called on list pages such as when you're viewing the list of wiki pages or the list of articles.
|
+;content_list_history_function: This function is called on history listing pages when you are viewing a history of changes. |
;content_preview_function: This function is called when a page is being editied and a user hits preview. it's mostly there for you to make any selections the user has made persistent during the preview phase.
|
;content_edit_function: When a user wants to edit content, this function is called. it allows you to generate data for any templates you need to fill in the edit page (more below).
|
;content_store_function: Here you can store the content data in your serice tables.
|
+;comment_store_function: Similar to content_store_function, this service is called after a comment object is completely stored. |
;content_expunge_function: Make sure the data from your tables is removed when a user removes the content it belongs to.
|
;content_user_perms_function: Modify the user's permissions for a content object. Generally intended for extending permissions. But this gives access to the user's permission hash for manipulation in whichever way.
|
-;content_access_control: Verify user has permission to access content. intended use is to fatal out if not.
|
+;content_verify_access: Verify user has permission to access content. intended use is to fatal out if not. |
|
!!! Templates
|
;content_edit_tab_tpl: This template is displayed as a seperate tab when a user is editing content. this is useful for services that might contain several lines of code and want to have their own section when a user edits a page. This template is only available when the user is editing data.
|