Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
tool_recyclebin\category_bin Class Reference

Represents a category's recyclebin. More...

Inheritance diagram for tool_recyclebin\category_bin:
tool_recyclebin\base_bin

Public Member Functions

 __construct ($categoryid)
 Constructor. More...
 
 can_delete ()
 Can we delete items in this recycle bin? More...
 
 can_restore ()
 Can we restore items in this recycle bin? More...
 
 can_view ()
 Can we view items in this recycle bin? More...
 
 delete_all_items ()
 Empty the recycle bin.
 
 delete_item ($item)
 Delete an item from the recycle bin. More...
 
 get_item ($itemid)
 Returns an item from the recycle bin. More...
 
 get_items ()
 Returns a list of items in the recycle bin for this course. More...
 
 restore_item ($item)
 Restore an item from the recycle bin. More...
 
 store_item ($course)
 Store a course in the recycle bin. More...
 

Static Public Member Functions

static is_enabled ()
 Is this recyclebin enabled? More...
 

Protected Attributes

int $_categoryid
 The category id.
 

Detailed Description

Represents a category's recyclebin.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_recyclebin\category_bin::__construct (   $categoryid)

Constructor.

Parameters
int$categoryidThe category id.

Member Function Documentation

◆ can_delete()

tool_recyclebin\category_bin::can_delete ( )

Can we delete items in this recycle bin?

Return values
boolreturns true if they can delete, false if not

Reimplemented from tool_recyclebin\base_bin.

◆ can_restore()

tool_recyclebin\category_bin::can_restore ( )

Can we restore items in this recycle bin?

Return values
boolreturns true if they can restore, false if not

Reimplemented from tool_recyclebin\base_bin.

◆ can_view()

tool_recyclebin\category_bin::can_view ( )

Can we view items in this recycle bin?

Return values
boolreturns true if they can view, false if not

Reimplemented from tool_recyclebin\base_bin.

◆ delete_item()

tool_recyclebin\category_bin::delete_item (   $item)

Delete an item from the recycle bin.

Parameters
stdClass$itemThe item database record
Exceptions
coding_exception

Reimplemented from tool_recyclebin\base_bin.

◆ get_item()

tool_recyclebin\category_bin::get_item (   $itemid)

Returns an item from the recycle bin.

Parameters
int$itemidItem ID to retrieve.
Return values
stdClassthe item.

Reimplemented from tool_recyclebin\base_bin.

◆ get_items()

tool_recyclebin\category_bin::get_items ( )

Returns a list of items in the recycle bin for this course.

Return values
arraythe list of items.

Reimplemented from tool_recyclebin\base_bin.

◆ is_enabled()

static tool_recyclebin\category_bin::is_enabled ( )
static

Is this recyclebin enabled?

Return values
booltrue if enabled, false if not.

Reimplemented from tool_recyclebin\base_bin.

◆ restore_item()

tool_recyclebin\category_bin::restore_item (   $item)

Restore an item from the recycle bin.

Parameters
stdClass$itemThe item database record
Exceptions
moodle_exception

Reimplemented from tool_recyclebin\base_bin.

◆ store_item()

tool_recyclebin\category_bin::store_item (   $course)

Store a course in the recycle bin.

Parameters
stdClass$courseCourse
Exceptions
moodle_exception

Reimplemented from tool_recyclebin\base_bin.


The documentation for this class was generated from the following file: