3 * @file include/event.php
4 * @brief functions specific to event handling
7 function format_event_html($ev, $simple = false) {
8 return \Friendica\Model\Event::getHTML($ev, $simple);
11 function format_event_bbcode($ev) {
12 return \Friendica\Model\Event::getBBCode($ev);
15 function bbtoevent($s) {
16 return \Friendica\Model\Event::fromBBCode($s);
19 function sort_by_date($a) {
20 return \Friendica\Model\Event::sortByDate($a);
23 function event_delete($event_id) {
24 \Friendica\Model\Event::delete($event_id);
27 function event_store($arr) {
28 return \Friendica\Model\Event::store($arr);
31 function get_event_strings() {
32 return \Friendica\Model\Event::getStrings();
35 function event_remove_duplicates($dates) {
36 return \Friendica\Model\Event::removeDuplicates($dates);
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);
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);
48 function process_events($arr) {
49 return \Friendica\Model\Event::prepareListForTemplate($arr);
52 function event_format_export($events, $format = 'ical', $timezone)
54 return \Friendica\Model\Event::formatListForExport($events, $format, $timezone);
57 function events_by_uid($uid = 0, $sql_extra = '') {
58 return \Friendica\Model\Event::getListByUserId($uid);
61 function event_export($uid, $format = 'ical') {
62 return \Friendica\Model\Event::exportListByUserId($uid, $format);
65 function widget_events() {
66 return \Friendica\Content\Widget\CalendarExport::getHTML();
69 function format_event_item($item) {
70 return \Friendica\Model\Event::getItemHTML($item);
73 function event_location2array($s = '') {
74 return \Friendica\Model\Event::locationToArray($s);