Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_recyclebin

Namespaces

namespace  tool_recyclebin
  
 
namespace  tool_recyclebin\event
  
 
namespace  tool_recyclebin\privacy
  
 
namespace  tool_recyclebin\task
  
 

Classes

class  tool_recyclebin\base_bin
 Represents a recyclebin. More...
 
class  tool_recyclebin\category_bin
 Represents a category's recyclebin. More...
 
class  tool_recyclebin\course_bin
 Represents a course's recyclebin. More...
 
class  tool_recyclebin\event\category_bin_item_created
 Event class. More...
 
class  tool_recyclebin\event\category_bin_item_deleted
 Event class. More...
 
class  tool_recyclebin\event\category_bin_item_restored
 Event Class. More...
 
class  tool_recyclebin\event\course_bin_item_created
 Event class. More...
 
class  tool_recyclebin\event\course_bin_item_deleted
 Event class. More...
 
class  tool_recyclebin\event\course_bin_item_restored
 Event class. More...
 
class  tool_recyclebin\privacy\provider
 Privacy Subsystem for tool_recyclebin implementing null_provider. More...
 
class  tool_recyclebin\task\cleanup_category_bin
 This task deletes expired category recyclebin items. More...
 
class  tool_recyclebin\task\cleanup_course_bin
 This task deletes expired course recyclebin items. More...
 

Functions

 tool_recyclebin_course_module_background_deletion_recommended ()
 Hook called to check whether async course module deletion should be performed or not.
 
 tool_recyclebin_extend_navigation_category_settings ($navigation, $context)
 Adds a recycle bin link to the course admin menu.
 
 tool_recyclebin_extend_navigation_course ($navigation, $course, $context)
 Adds a recycle bin link to the course admin menu.
 
 tool_recyclebin_get_fontawesome_icon_map ()
 Map icons for font-awesome themes.
 
 tool_recyclebin_pre_course_category_delete ($category)
 Hook called before we delete a category.
 
 tool_recyclebin_pre_course_delete ($course)
 Hook called before we delete a course.
 
 tool_recyclebin_pre_course_module_delete ($cm)
 Hook called before we delete a course module.
 

Variables

 $capabilities
 
global $PAGE
 
 $plugin = 2023041800
 
 $tasks
 
$plugin component = 'tool_recyclebin'
 
const tool_recyclebin::TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA 'recyclebin_course'
 
const tool_recyclebin::TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA 'recyclebin_coursecat'
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ tool_recyclebin_course_module_background_deletion_recommended()

tool_recyclebin_course_module_background_deletion_recommended ( )

Hook called to check whether async course module deletion should be performed or not.

Return values
trueif background deletion is required (is the recyclebin is enabled), false otherwise.

◆ tool_recyclebin_extend_navigation_category_settings()

tool_recyclebin_extend_navigation_category_settings ( $navigation,
$context )

Adds a recycle bin link to the course admin menu.

Parameters
navigation_node$navigationThe navigation node to extend
context$contextThe context of the course
Return values
void|nullreturn null if we don't want to display the node.

◆ tool_recyclebin_extend_navigation_course()

tool_recyclebin_extend_navigation_course ( $navigation,
$course,
$context )

Adds a recycle bin link to the course admin menu.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the tool
context$contextThe context of the course
Return values
void|nullreturn null if we don't want to display the node.

◆ tool_recyclebin_pre_course_category_delete()

tool_recyclebin_pre_course_category_delete ( $category)

Hook called before we delete a category.

Parameters
stdClass$categoryThe category record.

◆ tool_recyclebin_pre_course_delete()

tool_recyclebin_pre_course_delete ( $course)

Hook called before we delete a course.

Parameters
stdClass$courseThe course record.

◆ tool_recyclebin_pre_course_module_delete()

tool_recyclebin_pre_course_module_delete ( $cm)

Hook called before we delete a course module.

Parameters
stdClass$cmThe course module record.

Variable Documentation

◆ $tasks

$tasks
Initial value:
= array(
array(
'classname' => 'tool_recyclebin\task\cleanup_course_bin',
'blocking' => 0,
'minute' => '*/30',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'tool_recyclebin\task\cleanup_category_bin',
'blocking' => 0,
'minute' => '*/30',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
)
)