weekly release 3.6dev
[moodle.git] / calendar / classes / local / event / entities / event_interface.php
CommitLineData
e46efe3a
CB
1<?php
2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
17/**
18 * Calendar event interface.
19 *
20 * @package core_calendar
21 * @copyright 2017 Cameron Ball <cameron@cameron1729.xyz>
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 */
24
42e76c3f 25namespace core_calendar\local\event\entities;
e46efe3a 26
47a71017
MG
27use core_calendar\local\event\proxies\proxy_interface;
28
e46efe3a
CB
29defined('MOODLE_INTERNAL') || die();
30
31/**
32 * Interface for an event class.
33 *
34 * @copyright 2017 Cameron Ball <cameron@cameron1729.xyz>
35 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36 */
37interface event_interface {
38 /**
39 * Get the event's ID.
40 *
41 * @return integer
42 */
43 public function get_id();
44
45 /**
46 * Get the event's name.
47 *
48 * @return string
49 */
50 public function get_name();
51
52 /**
53 * Get the event's description.
54 *
20592f5f 55 * @return description_interface
e46efe3a
CB
56 */
57 public function get_description();
58
0085b0ea
AN
59 /**
60 * Get the category object associated with the event.
61 *
62 * @return proxy_interface
63 */
64 public function get_category();
65
e46efe3a
CB
66 /**
67 * Get the course object associated with the event.
68 *
20592f5f 69 * @return proxy_interface
e46efe3a
CB
70 */
71 public function get_course();
72
73 /**
74 * Get the course module object that created the event.
75 *
20592f5f 76 * @return proxy_interface
e46efe3a
CB
77 */
78 public function get_course_module();
79
80 /**
81 * Get the group object associated with the event.
82 *
20592f5f 83 * @return proxy_interface
e46efe3a
CB
84 */
85 public function get_group();
86
87 /**
88 * Get the user object associated with the event.
89 *
20592f5f 90 * @return proxy_interface
e46efe3a
CB
91 */
92 public function get_user();
93
94 /**
95 * Get the event's type.
96 *
97 * @return string
98 */
99 public function get_type();
100
101 /**
102 * Get the times associated with the event.
103 *
20592f5f 104 * @return times_interface
e46efe3a
CB
105 */
106 public function get_times();
107
108 /**
28852998
RW
109 * Get repeats of this event or null if the event has no
110 * repeats.
e46efe3a 111 *
28852998 112 * @return event_collection_interface|null
e46efe3a
CB
113 */
114 public function get_repeats();
115
116 /**
20592f5f 117 * Get the event's subscription.
e46efe3a 118 *
20592f5f 119 * @return proxy_interface
e46efe3a 120 */
5ca71c2d 121 public function get_subscription();
e46efe3a
CB
122
123 /**
124 * Get the event's visibility.
125 *
126 * @return bool true if the event is visible, false otherwise
127 */
128 public function is_visible();
129}