Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

The main interface for recycle bin methods.

Copyright: 2015 University of Kent
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 374 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

category_bin:: (10 methods):
  __construct()
  is_enabled()
  get_item()
  get_items()
  store_item()
  restore_item()
  delete_item()
  can_view()
  can_restore()
  can_delete()


Class: category_bin  - X-Ref

Represents a category's recyclebin.

__construct($categoryid)   X-Ref
Constructor.

param: int $categoryid The category id.

is_enabled()   X-Ref
Is this recyclebin enabled?

return: bool true if enabled, false if not.

get_item($itemid)   X-Ref
Returns an item from the recycle bin.

param: int $itemid Item ID to retrieve.
return: \stdClass the item.

get_items()   X-Ref
Returns a list of items in the recycle bin for this course.

return: array the list of items.

store_item($course)   X-Ref
Store a course in the recycle bin.

param: \stdClass $course Course

restore_item($item)   X-Ref
Restore an item from the recycle bin.

param: \stdClass $item The item database record

delete_item($item)   X-Ref
Delete an item from the recycle bin.

param: \stdClass $item The item database record

can_view()   X-Ref
Can we view items in this recycle bin?

return: bool returns true if they can view, false if not

can_restore()   X-Ref
Can we restore items in this recycle bin?

return: bool returns true if they can restore, false if not

can_delete()   X-Ref
Can we delete items in this recycle bin?

return: bool returns true if they can delete, false if not