Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
block_recentlyaccesseditems

Namespaces

namespace  block_recentlyaccesseditems
  
 
namespace  block_recentlyaccesseditems\external
  
 
namespace  block_recentlyaccesseditems\output
  
 
namespace  block_recentlyaccesseditems\privacy
  
 

Classes

class  block_recentlyaccesseditems
 Recently accessed items block class. More...
 
class  block_recentlyaccesseditems\external
 
class  block_recentlyaccesseditems\external\recentlyaccesseditems_item_exporter
 Class for exporting the data needed to render a recent accessed item. More...
 
class  block_recentlyaccesseditems\helper
 Recently accessed items helper. More...
 
class  block_recentlyaccesseditems\observer
 Events observer. More...
 
class  block_recentlyaccesseditems\output\main
 Class containing data for Recently accessed items block. More...
 
class  block_recentlyaccesseditems\output\renderer
 Recently accessed items block renderer. More...
 
class  block_recentlyaccesseditems\privacy\provider
 Privacy Subsystem for block_recentlyaccesseditems. More...
 

Functions

 block_recentlyaccesseditems_pre_course_delete ($course)
 Pre-delete course hook to cleanup any records with references to the deleted course.
 
 block_recentlyaccesseditems_pre_course_module_delete ($cm)
 Pre-delete course module hook to cleanup any records with references to the deleted module.
 
 xmldb_block_recentlyaccesseditems_upgrade ($oldversion, $block)
 Upgrade the recentlyaccesseditems db table.
 

Variables

 $capabilities
 
 $functions
 
 $observers
 
 $plugin = 2024041600
 
$plugin component = 'block_recentlyaccesseditems'
 
$plugin version = 2024042200
 

Detailed Description

Function Documentation

◆ block_recentlyaccesseditems_pre_course_delete()

block_recentlyaccesseditems_pre_course_delete ( $course)

Pre-delete course hook to cleanup any records with references to the deleted course.

Parameters
stdClass$courseThe deleted course

◆ block_recentlyaccesseditems_pre_course_module_delete()

block_recentlyaccesseditems_pre_course_module_delete ( $cm)

Pre-delete course module hook to cleanup any records with references to the deleted module.

Parameters
stdClass$cmThe deleted course module

◆ xmldb_block_recentlyaccesseditems_upgrade()

xmldb_block_recentlyaccesseditems_upgrade ( $oldversion,
$block )

Upgrade the recentlyaccesseditems db table.

Parameters
$oldversion
Return values
bool

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'block/recentlyaccesseditems:myaddinstance' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
)
)
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115

◆ $functions

$functions
Initial value:
= array(
'block_recentlyaccesseditems_get_recent_items' => array(
'classname' => 'block_recentlyaccesseditems\external',
'methodname' => 'get_recent_items',
'classpath' => '',
'description' => 'List of items a user has accessed most recently.',
'type' => 'read',
'ajax' => true,
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
),
)
const MOODLE_OFFICIAL_MOBILE_SERVICE
Moodle mobile app service name.
Definition moodlelib.php:555

◆ $observers

$observers
Initial value:
= array (
array(
'eventname' => '\core\event\course_module_viewed',
'callback' => 'block_recentlyaccesseditems\observer::store',
),
array(
'eventname' => '\core\event\course_module_deleted',
'callback' => 'block_recentlyaccesseditems\observer::remove'
),
)