MDL-77350 tag: Added class properties that are not declared

This commit is contained in:
Meirza 2023-03-27 11:21:23 +07:00
parent 760a8c426e
commit 53eecdfef1

View File

@ -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;
}