MDL-54102 core: added more details about hooks

This commit is contained in:
Mark Nelson 2016-05-10 15:24:09 +08:00
parent 3fb5ddc3d6
commit a9ad3002e1

View File

@ -120,12 +120,14 @@ information provided here is intended especially for developers.
* flexible_table::get_download_menu(), considered private, has been deleted. Use
$OUTPUT->download_dataformat_selector() instead.
* Introduced new hooks for plugin developers.
* pre_course_category_delete($category)
* pre_course_delete($course)
* pre_course_module_delete($cm)
* pre_block_delete($instance)
* pre_user_delete($user)
These hooks allow developers to use the item in question before it is deleted by core.
- <component>_pre_course_category_delete($category)
- <component>_pre_course_delete($course)
- <component>_pre_course_module_delete($cm)
- <component>_pre_block_delete($instance)
- <component>_pre_user_delete($user)
These hooks allow developers to use the item in question before it is deleted by core. For example, if your plugin is
a module (plugins located in the mod folder) called 'xxx' and you wish to interact with the user object before it is
deleted then the function to create would be mod_xxx_pre_user_delete($user) in mod/xxx/lib.php.
=== 3.0 ===