See Release Notes
Long Term Support Release
Contains the component_favourite_service class, part of the service layer for the favourites subsystem.
Copyright: | 2019 Jake Dallimore <jrhdallimore@gmail.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 77 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
component_favourite_service:: (2 methods):
__construct()
delete_favourites_by_type_and_item()
Class: component_favourite_service - X-Ref
Class service, providing an single API for interacting with the favourites subsystem, for all favourites of a specific component.__construct(string $component, favourite_repository_interface $repository) X-Ref |
The component_favourite_service constructor. param: string $component The frankenstyle name of the component to which this service operations are scoped. param: \core_favourites\local\repository\favourite_repository_interface $repository a favourites repository. |
delete_favourites_by_type_and_item(string $itemtype, int $itemid, \context $context = null) X-Ref |
Delete a collection of favourites by type and item, and optionally for a given context. E.g. delete all favourites of type 'message_conversations' for the conversation '11' and in the CONTEXT_COURSE context. param: string $itemtype the type of the favourited items. param: int $itemid the id of the item to which the favourites relate param: \context $context the context of the items which were favourited. |