Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
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. More...
 
static get_service_for_user_context (\context_user $context)
 Returns a basic service object providing operations for user favourites. More...
 

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

◆ 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

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