MIDDAG for Moodle

course extends abstract_moodle_entity

Course Entity (Moodle Native).

Table of Contents

Properties

$cacherev  : int
$calendartype  : string
$category  : int
$completionnotify  : int
$defaultgroupingid  : int
$downloadcontent  : int|null
$enablecompletion  : int
$enddate  : int
$format  : string
$fullname  : string
$groupmode  : int
$groupmodeforce  : int
$id  : int
$idnumber  : string
$lang  : string
$legacyfiles  : int
$marker  : int
$maxbytes  : int
$newsitems  : int
$originalcourseid  : int|null
$pdfexportfont  : string|null
$relativedatesmode  : int
$requested  : int
$shortname  : string
$showactivitydates  : int
$showcompletionconditions  : int|null
$showgrades  : int
$showreports  : int
$sortorder  : int
$startdate  : int
$summary  : string|null
$summaryformat  : int
$theme  : string
$timecreated  : int
$timemodified  : int
$visible  : int
$visibleold  : int

Methods

__call()  : mixed
Magic accessor to support get_* and with_* helpers for entity properties.
__get()  : mixed
Magic getter to allow reading protected properties.
__isset()  : bool
Magic isset to allow checking protected properties.
__set()  : void
Magic setter.
as_std_class()  : stdClass
Returns the entity as stdClass (alias for to_record).
from_record()  : static
Factory method to create an entity from a Moodle record.
get_cacherev()  : int
get_calendartype()  : string
get_category()  : int
get_completionnotify()  : int
get_defaultgroupingid()  : int
get_downloadcontent()  : null|int
get_enablecompletion()  : int
get_enddate()  : int
get_format()  : string
get_fullname()  : string
get_groupmode()  : int
get_groupmodeforce()  : int
get_id()  : null|int
Get the entity unique identifier.
get_idnumber()  : string
get_lang()  : string
get_legacyfiles()  : int
get_marker()  : int
get_maxbytes()  : int
get_newsitems()  : int
get_originalcourseid()  : null|int
get_pdfexportfont()  : null|string
get_relativedatesmode()  : int
get_requested()  : int
get_shortname()  : string
get_showactivitydates()  : int
get_showcompletionconditions()  : null|int
get_showgrades()  : int
get_showreports()  : int
get_sortorder()  : int
get_startdate()  : int
get_summary()  : null|string
get_summaryformat()  : int
get_table()  : string
Returns the Moodle database table name.
get_theme()  : string
get_timecreated()  : int
Get entity creation timestamp.
get_timemodified()  : int
Get entity modification timestamp.
get_visible()  : int
get_visibleold()  : int
jsonSerialize()  : array<string, mixed>
Serializes the object to a value that can be natively serialized by json_encode().
to_array()  : array<string, mixed>
Implementation for entity_interface.
to_record()  : stdClass
Converts the entity to a stdClass record for Moodle APIs.
with_cacherev()  : self
with_calendartype()  : self
with_category()  : self
with_completionnotify()  : self
with_defaultgroupingid()  : self
with_downloadcontent()  : self
with_enablecompletion()  : self
with_enddate()  : self
with_format()  : self
with_fullname()  : self
with_groupmode()  : self
with_groupmodeforce()  : self
with_id()  : $this
Set entity identifier.
with_idnumber()  : self
with_lang()  : self
with_legacyfiles()  : self
with_marker()  : self
with_maxbytes()  : self
with_newsitems()  : self
with_originalcourseid()  : self
with_pdfexportfont()  : self
with_relativedatesmode()  : self
with_requested()  : self
with_shortname()  : self
with_showactivitydates()  : self
with_showcompletionconditions()  : self
with_showgrades()  : self
with_showreports()  : self
with_sortorder()  : self
with_startdate()  : self
with_summary()  : self
with_summaryformat()  : self
with_theme()  : self
with_timecreated()  : $this
Set entity creation timestamp.
with_timemodified()  : $this
Set entity modification timestamp.
with_visible()  : self
with_visibleold()  : self

Properties

$cacherev

protected int $cacherev = 0

$calendartype

protected string $calendartype = ''

$category

protected int $category = 0

$completionnotify

protected int $completionnotify = 0

$defaultgroupingid

protected int $defaultgroupingid = 0

$downloadcontent

protected int|null $downloadcontent = null

$enablecompletion

protected int $enablecompletion = 0

$enddate

protected int $enddate = 0

$format

protected string $format = 'topics'

$fullname

protected string $fullname = ''

$groupmode

protected int $groupmode = 0

$groupmodeforce

protected int $groupmodeforce = 0

$idnumber

protected string $idnumber = ''

$lang

protected string $lang = ''

$legacyfiles

protected int $legacyfiles = 0

$marker

protected int $marker = 0

$maxbytes

protected int $maxbytes = 0

$newsitems

protected int $newsitems = 1

$originalcourseid

protected int|null $originalcourseid = null

$pdfexportfont

protected string|null $pdfexportfont = null

$relativedatesmode

protected int $relativedatesmode = 0

$requested

protected int $requested = 0

$shortname

protected string $shortname = ''

$showactivitydates

protected int $showactivitydates = 0

$showcompletionconditions

protected int|null $showcompletionconditions = null

$showgrades

protected int $showgrades = 1

$showreports

protected int $showreports = 0

$sortorder

protected int $sortorder = 0

$startdate

protected int $startdate = 0

$summary

protected string|null $summary = null

$summaryformat

protected int $summaryformat = 0

$theme

protected string $theme = ''

$visible

protected int $visible = 1

$visibleold

protected int $visibleold = 1

Methods

__call()

Magic accessor to support get_* and with_* helpers for entity properties.

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

__get()

Magic getter to allow reading protected properties.

public __get(string $name) : mixed
Parameters
$name : string

Property name

__isset()

Magic isset to allow checking protected properties.

public __isset(string $name) : bool
Parameters
$name : string

Property name

Return values
bool

__set()

Magic setter.

public __set(string $name, mixed $value) : void
Parameters
$name : string

Property name

$value : mixed

Value

as_std_class()

Returns the entity as stdClass (alias for to_record).

public as_std_class() : stdClass
Return values
stdClass

from_record()

Factory method to create an entity from a Moodle record.

public static from_record(array<string|int, mixed>|stdClass $record) : static

Automatically casts values to match property types (int, string, etc.) since Moodle's database layer often returns numeric values as strings.

Parameters
$record : array<string|int, mixed>|stdClass
Return values
static

get_cacherev()

public get_cacherev() : int
Return values
int

get_calendartype()

public get_calendartype() : string
Return values
string

get_category()

public get_category() : int
Return values
int

get_completionnotify()

public get_completionnotify() : int
Return values
int

get_defaultgroupingid()

public get_defaultgroupingid() : int
Return values
int

get_downloadcontent()

public get_downloadcontent() : null|int
Return values
null|int

get_enablecompletion()

public get_enablecompletion() : int
Return values
int

get_enddate()

public get_enddate() : int
Return values
int

get_format()

public get_format() : string
Return values
string

get_fullname()

public get_fullname() : string
Return values
string

get_groupmode()

public get_groupmode() : int
Return values
int

get_groupmodeforce()

public get_groupmodeforce() : int
Return values
int

get_idnumber()

public get_idnumber() : string
Return values
string

get_lang()

public get_lang() : string
Return values
string

get_legacyfiles()

public get_legacyfiles() : int
Return values
int

get_marker()

public get_marker() : int
Return values
int

get_maxbytes()

public get_maxbytes() : int
Return values
int

get_newsitems()

public get_newsitems() : int
Return values
int

get_originalcourseid()

public get_originalcourseid() : null|int
Return values
null|int

get_pdfexportfont()

public get_pdfexportfont() : null|string
Return values
null|string

get_relativedatesmode()

public get_relativedatesmode() : int
Return values
int

get_requested()

public get_requested() : int
Return values
int

get_shortname()

public get_shortname() : string
Return values
string

get_showactivitydates()

public get_showactivitydates() : int
Return values
int

get_showcompletionconditions()

public get_showcompletionconditions() : null|int
Return values
null|int

get_showgrades()

public get_showgrades() : int
Return values
int

get_showreports()

public get_showreports() : int
Return values
int

get_sortorder()

public get_sortorder() : int
Return values
int

get_startdate()

public get_startdate() : int
Return values
int

get_summary()

public get_summary() : null|string
Return values
null|string

get_summaryformat()

public get_summaryformat() : int
Return values
int

get_table()

Returns the Moodle database table name.

public static get_table() : string
Return values
string

get_theme()

public get_theme() : string
Return values
string

get_timecreated()

Get entity creation timestamp.

public get_timecreated() : int
Return values
int

get_timemodified()

Get entity modification timestamp.

public get_timemodified() : int
Return values
int

get_visible()

public get_visible() : int
Return values
int

get_visibleold()

public get_visibleold() : int
Return values
int

jsonSerialize()

Serializes the object to a value that can be natively serialized by json_encode().

public jsonSerialize() : array<string, mixed>
Tags
noinspection

PhpMethodNamingConventionInspection

Return values
array<string, mixed>

to_array()

Implementation for entity_interface.

public to_array() : array<string, mixed>
Return values
array<string, mixed>

to_record()

Converts the entity to a stdClass record for Moodle APIs.

public to_record() : stdClass
Return values
stdClass

with_cacherev()

public with_cacherev(int $cacherev) : self
Parameters
$cacherev : int
Return values
self

with_calendartype()

public with_calendartype(string $calendartype) : self
Parameters
$calendartype : string
Return values
self

with_category()

public with_category(int $category) : self
Parameters
$category : int
Return values
self

with_completionnotify()

public with_completionnotify(int $completionnotify) : self
Parameters
$completionnotify : int
Return values
self

with_defaultgroupingid()

public with_defaultgroupingid(int $defaultgroupingid) : self
Parameters
$defaultgroupingid : int
Return values
self

with_downloadcontent()

public with_downloadcontent(int|null $downloadcontent) : self
Parameters
$downloadcontent : int|null
Return values
self

with_enablecompletion()

public with_enablecompletion(int $enablecompletion) : self
Parameters
$enablecompletion : int
Return values
self

with_enddate()

public with_enddate(int $enddate) : self
Parameters
$enddate : int
Return values
self

with_format()

public with_format(string $format) : self
Parameters
$format : string
Return values
self

with_fullname()

public with_fullname(string $fullname) : self
Parameters
$fullname : string
Return values
self

with_groupmode()

public with_groupmode(int $groupmode) : self
Parameters
$groupmode : int
Return values
self

with_groupmodeforce()

public with_groupmodeforce(int $groupmodeforce) : self
Parameters
$groupmodeforce : int
Return values
self

with_id()

Set entity identifier.

public with_id(null|int $id) : $this
Parameters
$id : null|int
Return values
$this

with_idnumber()

public with_idnumber(string $idnumber) : self
Parameters
$idnumber : string
Return values
self

with_lang()

public with_lang(string $lang) : self
Parameters
$lang : string
Return values
self

with_legacyfiles()

public with_legacyfiles(int $legacyfiles) : self
Parameters
$legacyfiles : int
Return values
self

with_marker()

public with_marker(int $marker) : self
Parameters
$marker : int
Return values
self

with_maxbytes()

public with_maxbytes(int $maxbytes) : self
Parameters
$maxbytes : int
Return values
self

with_newsitems()

public with_newsitems(int $newsitems) : self
Parameters
$newsitems : int
Return values
self

with_originalcourseid()

public with_originalcourseid(int|null $originalcourseid) : self
Parameters
$originalcourseid : int|null
Return values
self

with_pdfexportfont()

public with_pdfexportfont(string|null $pdfexportfont) : self
Parameters
$pdfexportfont : string|null
Return values
self

with_relativedatesmode()

public with_relativedatesmode(int $relativedatesmode) : self
Parameters
$relativedatesmode : int
Return values
self

with_requested()

public with_requested(int $requested) : self
Parameters
$requested : int
Return values
self

with_shortname()

public with_shortname(string $shortname) : self
Parameters
$shortname : string
Return values
self

with_showactivitydates()

public with_showactivitydates(int $showactivitydates) : self
Parameters
$showactivitydates : int
Return values
self

with_showcompletionconditions()

public with_showcompletionconditions(int|null $showcompletionconditions) : self
Parameters
$showcompletionconditions : int|null
Return values
self

with_showgrades()

public with_showgrades(int $showgrades) : self
Parameters
$showgrades : int
Return values
self

with_showreports()

public with_showreports(int $showreports) : self
Parameters
$showreports : int
Return values
self

with_sortorder()

public with_sortorder(int $sortorder) : self
Parameters
$sortorder : int
Return values
self

with_startdate()

public with_startdate(int $startdate) : self
Parameters
$startdate : int
Return values
self

with_summary()

public with_summary(string|null $summary) : self
Parameters
$summary : string|null
Return values
self

with_summaryformat()

public with_summaryformat(int $summaryformat) : self
Parameters
$summaryformat : int
Return values
self

with_theme()

public with_theme(string $theme) : self
Parameters
$theme : string
Return values
self

with_timecreated()

Set entity creation timestamp.

public with_timecreated(int $timecreated) : $this
Parameters
$timecreated : int
Return values
$this

with_timemodified()

Set entity modification timestamp.

public with_timemodified(int $timemodified) : $this
Parameters
$timemodified : int
Return values
$this

with_visible()

public with_visible(int $visible) : self
Parameters
$visible : int
Return values
self

with_visibleold()

public with_visibleold(int $visibleold) : self
Parameters
$visibleold : int
Return values
self

        
On this page

Search results