Detailed Description
Definition at line 1659 of file lib.php.
Constructor & Destructor Documentation
Instantiates a new event and optionally populates its properties with the data provided
- Parameters:
-
| stdClass | $data | Optional. An object containing the properties to for an event |
Definition at line 1696 of file lib.php.
Member Function Documentation
Magic get method
Attempts to call a get_$key method to return the property and ralls over to return the raw property
- Parameters:
-
- Returns:
- mixed
Definition at line 1768 of file lib.php.
Stupid PHP needs an isset magic method if you use the get magic method and still want empty calls to work.... blah ~!
- Parameters:
-
- Returns:
- bool
Definition at line 1785 of file lib.php.
Magic property method
Attempts to call a set_$key method if one exists otherwise falls back to simply set the property
- Parameters:
-
Definition at line 1752 of file lib.php.
Calculate the context value needed for calendar_event. Event's type can be determine by the available value store in $data It is important to check for the existence of course/courseid to determine the course event. Default value is set to CONTEXT_USER
- Returns:
- stdClass
Definition at line 1798 of file lib.php.
Attempts to call the hook for the specified action should a calendar type by set $CFG->calendar, and the appopriate function defined
bool $extcalendarinc Used to track the inclusion of the calendar lib
- Parameters:
-
| string | $action | One of `update_event`, `add_event`, `delete_event`, `show_event`, `hide_event` |
| array | $args | The args to pass to the hook, usually the event is the first element |
- Returns:
- bool
Definition at line 2250 of file lib.php.
Return the number of repeat events there are in this events series
- Returns:
- int
Definition at line 1876 of file lib.php.
| static create |
( |
$ |
properties | ) |
[static] |
Creates a new event and returns a calendar_event object
- Parameters:
-
| object | array | $properties | An object containing event properties |
- Returns:
- calendar_event|false The event object or false if it failed
Definition at line 2298 of file lib.php.
| delete |
( |
$ |
deleterepeated = false | ) |
|
Deletes an event and if selected an repeated events in the same series
This function deletes an event, any associated events if $deleterepeated=true, and cleans up any files associated with the events.
- See also:
- delete_event()
- Parameters:
-
- Returns:
- bool
Definition at line 2078 of file lib.php.
Returns an event description: Called by __get Please use $blah = $event->description;
- Returns:
- string
Definition at line 1837 of file lib.php.
Returns an array of editoroptions for this event: Called by __get Please use $blah = $event->editoroptions;
- Returns:
- array
Definition at line 1827 of file lib.php.
| static load |
( |
$ |
param | ) |
[static] |
Returns a calendar_event object when provided with an event id
This function makes use of MUST_EXIST, if the event id passed in is invalid it will result in an exception being thrown
- Parameters:
-
- Returns:
- calendar_event|false
Definition at line 2281 of file lib.php.
Fetch all event properties
This function returns all of the events properties as an object and optionally can prepare an editor for the description field at the same time. This is designed to work when the properties are going to be used to set the default values of a moodle forms form.
- Parameters:
-
| bool | $prepareeditor | If set to true a editor is prepared for use with the mforms editor element. (for description) |
- Returns:
- stdClass Object containing event properties
Definition at line 2134 of file lib.php.
Toggles the visibility of an event
- Parameters:
-
| null | bool | $force | If it is left null the events visibility is flipped, If it is false the event is made hidden, if it is true it is made visible. |
Definition at line 2216 of file lib.php.
Update or create an event within the database
Pass in a object containing the event properties and this function will insert it into the database and deal with any associated files
- See also:
- add_event()
-
update_event()
- Parameters:
-
| stdClass | $data | |
| boolean | $checkcapability | if moodle should check calendar managing capability or not |
Definition at line 1898 of file lib.php.
Field Documentation
$_description = null [protected] |
$editorcontext = null [protected] |
$editoroptions [protected] |
Initial value: array(
'subdirs'=>false,
'forcehttps'=>false,
'maxfiles'=>-1,
'maxbytes'=>null,
'trusttext'=>false)
Definition at line 1677 of file lib.php.
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/calendar/lib.php