mirror of
https://github.com/moodle/moodle.git
synced 2025-07-26 00:31:35 +02:00
MDL-77350 tag: Added class properties that are not declared
This commit is contained in:
@@ -74,6 +74,15 @@ class core_tag_tag {
|
|||||||
/** @var int option to hide standard tags when editing item tags */
|
/** @var int option to hide standard tags when editing item tags */
|
||||||
const HIDE_STANDARD = 2;
|
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.
|
* Constructor. Use functions get(), get_by_name(), etc.
|
||||||
*
|
*
|
||||||
@@ -83,6 +92,9 @@ class core_tag_tag {
|
|||||||
if (empty($record->id)) {
|
if (empty($record->id)) {
|
||||||
throw new coding_exception("Record must contain at least field '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;
|
$this->record = $record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user