Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
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. More...
 

Public Attributes

string $component
 $component the frankenstyle name of the component containing the favourited item. More...
 
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. More...
 
string $itemtype
 $itemtype the type of the item being marked as a favourite. More...
 
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.
 
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: