Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_favourites\local\entity\favourite Class Reference

Contains the favourite class, each instance being a representation of a DB row for the 'favourite' table. More...

Public Member Functions

 __construct (string $component, string $itemtype, int $itemid, int $contextid, int $userid)
 Favourite constructor.
 

Public Attributes

string $component
 $component the frankenstyle name of the component containing the favourited item.
 
int $contextid
 $contextid the id of the context in which this favourite was created.
 
int $id
 $id the id of the favourite.
 
int $itemid
 $itemid the id of the item that is being marked as a favourite.
 
string $itemtype
 $itemtype the type of the item being marked as a favourite.
 
int $ordering
 $ordering the ordering of the favourite within it's favourite area.
 
int $timecreated
 $timecreated the time at which the favourite was created.
 
int $timemodified
 $timemodified the time at which the last modification of the favourite took place.
 
string $uniquekey
 $uniquekey favourite unique key.
 
int $userid
 $userid the id of user who owns this favourite.
 

Detailed Description

Contains the favourite class, each instance being a representation of a DB row for the 'favourite' table.

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

Constructor & Destructor Documentation

◆ __construct()

core_favourites\local\entity\favourite::__construct ( string $component,
string $itemtype,
int $itemid,
int $contextid,
int $userid )

Favourite constructor.

Parameters
string$componentthe frankenstyle name of the component containing the favourited item. E.g. 'core_course'.
string$itemtypethe type of the item being marked as a favourite. E.g. 'course', 'conversation', etc.
int$itemidthe id of the item that is being marked as a favourite. e.g course->id, conversation->id, etc.
int$contextidthe id of the context in which this favourite was created.
int$useridthe id of user who owns this favourite.

Member Data Documentation

◆ $component

string core_favourites\local\entity\favourite::$component

$component the frankenstyle name of the component containing the favourited item.

E.g. 'core_course'.

◆ $itemid

int core_favourites\local\entity\favourite::$itemid

$itemid the id of the item that is being marked as a favourite.

e.g course->id, conversation->id, etc.

◆ $itemtype

string core_favourites\local\entity\favourite::$itemtype

$itemtype the type of the item being marked as a favourite.

E.g. 'course', 'conversation', etc.


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