mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-77350 tag: Added class properties that are not declared
This commit is contained in:
parent
760a8c426e
commit
53eecdfef1
@ -74,6 +74,15 @@ class core_tag_tag {
|
||||
/** @var int option to hide standard tags when editing item tags */
|
||||
const HIDE_STANDARD = 2;
|
||||
|
||||
/** @var int|null tag context ID. */
|
||||
public $taginstancecontextid;
|
||||
|
||||
/** @var int|null time modification. */
|
||||
public $timemodified;
|
||||
|
||||
/** @var int|null 0 if not flagged or positive integer if flagged. */
|
||||
public $flag;
|
||||
|
||||
/**
|
||||
* Constructor. Use functions get(), get_by_name(), etc.
|
||||
*
|
||||
@ -83,6 +92,9 @@ class core_tag_tag {
|
||||
if (empty($record->id)) {
|
||||
throw new coding_exception("Record must contain at least field 'id'");
|
||||
}
|
||||
// The following three variables must be added because the database ($record) does not contain them.
|
||||
$this->taginstancecontextid = $record->taginstancecontextid ?? null;
|
||||
$this->flag = $record->flag ?? null;
|
||||
$this->record = $record;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user