]> git.mxchange.org Git - friendica.git/blob - include/event.php
84daf81e7c49bf4bb2f75b8d4ed8bedb23010455
[friendica.git] / include / event.php
1 <?php
2 /**
3  * @file include/event.php
4  * @brief functions specific to event handling
5  */
6
7 function format_event_html($ev, $simple = false) {
8         return \Friendica\Model\Event::getHTML($ev, $simple);
9 }
10
11 function format_event_bbcode($ev) {
12         return \Friendica\Model\Event::getBBCode($ev);
13 }
14
15 function bbtoevent($s) {
16         return \Friendica\Model\Event::fromBBCode($s);
17 }
18
19 function sort_by_date($a) {
20         return \Friendica\Model\Event::sortByDate($a);
21 }
22
23 function event_delete($event_id) {
24          \Friendica\Model\Event::delete($event_id);
25 }
26
27 function event_store($arr) {
28         return \Friendica\Model\Event::store($arr);
29 }
30
31 function get_event_strings() {
32         return \Friendica\Model\Event::getStrings();
33 }
34
35 function event_remove_duplicates($dates) {
36         return \Friendica\Model\Event::removeDuplicates($dates);
37 }
38
39 function event_by_id($owner_uid = 0, $event_params, $sql_extra = '') {
40         return \Friendica\Model\Event::getListById($owner_uid, $event_params['event-id'], $sql_extra);
41 }
42
43 function events_by_date($owner_uid = 0, $event_params, $sql_extra = '') {
44         $event_params['ignore'] = $event_params['ignored'];
45         return \Friendica\Model\Event::getListByDate($owner_uid, $event_params, $sql_extra);
46 }
47
48 function process_events($arr) {
49         return \Friendica\Model\Event::prepareListForTemplate($arr);
50 }
51
52 function event_format_export($events, $format = 'ical', $timezone)
53 {
54         return \Friendica\Model\Event::formatListForExport($events, $format, $timezone);
55 }
56
57 function events_by_uid($uid = 0, $sql_extra = '') {
58         return \Friendica\Model\Event::getListByUserId($uid);
59 }
60
61 function event_export($uid, $format = 'ical') {
62         return \Friendica\Model\Event::exportListByUserId($uid, $format);
63 }
64
65 function widget_events() {
66         return \Friendica\Content\Widget\CalendarExport::getHTML();
67 }
68
69 function format_event_item($item) {
70         return \Friendica\Model\Event::getItemHTML($item);
71 }
72
73 function event_location2array($s = '') {
74         return \Friendica\Model\Event::locationToArray($s);
75 }