Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_favourites\service_factory Class Reference

Class service_factory, providing functions for location of service objects for the favourites subsystem. More...

Static Public Member Functions

static get_service_for_component (string $component)
 Returns a basic service object providing operations for favourites belonging to a given component.
 
static get_service_for_user_context (\context_user $context)
 Returns a basic service object providing operations for user favourites.
 

Detailed Description

Class service_factory, providing functions for location of service objects for the favourites subsystem.

This class is responsible for providing service objects to clients only.

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

Member Function Documentation

◆ get_service_for_component()

static core_favourites\service_factory::get_service_for_component ( string $component)
static

Returns a basic service object providing operations for favourites belonging to a given component.

Parameters
string$componentfrankenstyle component name.
Return values
local\service\component_favourite_servicethe service object.

◆ get_service_for_user_context()

static core_favourites\service_factory::get_service_for_user_context ( \context_user $context)
static

Returns a basic service object providing operations for user favourites.

Parameters
context_user$contextthe context of the user to which the service should be scoped.
Return values
core_favourites\local\service\user_favourite_servicethe service object.

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