revision_interface
interface revision_interface implements entity_interface
Interface Revision.
Contract for a historical revision of an item. Represents the state of an item at a specific point in time. All revisions are strictly immutable.
Methods
Get the ID of the original item this revision belongs to.
Get the revision number.
Get the revision format identifier.
Get the item type identifier stored in the revision.
Get the context ID associated with the revision.
Get the course ID associated with the revision.
Get the user ID linked to the revision.
Get the parent item ID if hierarchical.
Get the full name stored in the revision.
Get the short name stored in the revision.
Get the external idnumber stored in the revision.
Get the description text captured in the revision.
Get the Moodle format constant for the description.
Get the status recorded in the revision.
Get the raw visibility flag stored in the revision.
Check if the revision marks the item as visible.
Get the GUID reference if present in the revision.
Get the sort order value captured in the revision.
Get the version string stored in the revision.
Get the user who last modified the original item.
Get the user who created the revision.
Get the timestamp when the revision was created.
Retrieve a specific metadata value from this revision.
Check if metadata existed in this revision.
Get all metadata stored in this revision.
Details
in
entity_interface at line 36
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
in
entity_interface at line 44
array
to_array()
Convert the entity state to a plain associative array.
Useful for DTO conversion, logging, or debugging.
at line 32
int
get_itemid()
Get the ID of the original item this revision belongs to.
at line 37
int
get_revisionnumber()
Get the revision number.
at line 42
string
get_revisionformat()
Get the revision format identifier.
at line 47
string
get_type()
Get the item type identifier stored in the revision.
at line 52
int|null
get_contextid()
Get the context ID associated with the revision.
at line 57
int|null
get_courseid()
Get the course ID associated with the revision.
at line 62
int|null
get_userid()
Get the user ID linked to the revision.
at line 67
int|null
get_parent()
Get the parent item ID if hierarchical.
at line 72
string|null
get_fullname()
Get the full name stored in the revision.
at line 77
string|null
get_shortname()
Get the short name stored in the revision.
at line 82
string|null
get_idnumber()
Get the external idnumber stored in the revision.
at line 87
string|null
get_description()
Get the description text captured in the revision.
at line 92
int
get_descriptionformat()
Get the Moodle format constant for the description.
at line 97
string
get_status()
Get the status recorded in the revision.
at line 102
int
get_visible()
Get the raw visibility flag stored in the revision.
at line 107
bool
is_visible()
Check if the revision marks the item as visible.
at line 112
string|null
get_guid()
Get the GUID reference if present in the revision.
at line 117
int
get_sortorder()
Get the sort order value captured in the revision.
at line 122
string|null
get_version()
Get the version string stored in the revision.
at line 127
int|null
get_usermodified()
Get the user who last modified the original item.
at line 132
int|null
get_usercreated()
Get the user who created the revision.
at line 137
int
get_timecreated()
Get the timestamp when the revision was created.
at line 149
mixed
get_meta(string $key, mixed $default = null)
Retrieve a specific metadata value from this revision.
at line 158
bool
has_meta(string $key)
Check if metadata existed in this revision.
at line 165
array
get_all_meta()
Get all metadata stored in this revision.