Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_user\hook\extend_bulk_user_actions Class Reference
Inheritance diagram for core_user\hook\extend_bulk_user_actions:
core\hook\deprecated_callback_replacement core\hook\described_hook

Public Member Functions

 add_action (string $identifier, ?action_link $action, ?string $category=null)
 To be called by callback to add an action to the bulk user actions menu.
 
 find_action_category (string $identifier)
 Allows to locate an action by the identifier.
 
 get_actions ()
 Returns all actions groupped by category.
 

Static Public Member Functions

static get_deprecated_plugin_callbacks ()
 Returns list of lib.php plugin callbacks that were deprecated by the hook.
 
static get_hook_description ()
 Describes the hook purpose.
 
static get_hook_tags ()
 List of tags that describe this hook.
 

Member Function Documentation

◆ add_action()

core_user\hook\extend_bulk_user_actions::add_action ( string $identifier,
?action_link $action,
?string $category = null )

To be called by callback to add an action to the bulk user actions menu.

Callbacks with higher priority will be called first and actions they added will be displayed first. Callbacks with lower priority can override actions added by callbacks with higher priority.

To prevent accidental overrides plugins should prefix the action identifier with the plugin name.

Parameters
string$identifierUnique key for the action, recommended to prefix with plugin name
action_link | null$actionan object containing the action URL and text, other properties are ignored. Can be set to null to remove an action added by somebody else.
?string$categoryLabel for the option group in the action select dropdown

◆ find_action_category()

core_user\hook\extend_bulk_user_actions::find_action_category ( string $identifier)

Allows to locate an action by the identifier.

This method returns the option group label. The action itself can be found as: $category = $this->find_action_category($identifier); $action = $this->get_actions()[$category][$identifier];

Parameters
string$identifier
Return values
string|null

◆ get_actions()

core_user\hook\extend_bulk_user_actions::get_actions ( )

Returns all actions groupped by category.

Return values
action_link[][]

◆ get_deprecated_plugin_callbacks()

static core_user\hook\extend_bulk_user_actions::get_deprecated_plugin_callbacks ( )
static

Returns list of lib.php plugin callbacks that were deprecated by the hook.

Return values
array

Implements core\hook\deprecated_callback_replacement.

◆ get_hook_description()

static core_user\hook\extend_bulk_user_actions::get_hook_description ( )
static

Describes the hook purpose.

Return values
string

Implements core\hook\described_hook.

◆ get_hook_tags()

static core_user\hook\extend_bulk_user_actions::get_hook_tags ( )
static

List of tags that describe this hook.

Return values
string[]

Implements core\hook\described_hook.


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