Version: current

     1 <?php
     2 /**
     3  * Расширение для отображения календаря
     4  *
     5  * @author menedem
     6  */
     7 class CalendarWidgetExtention extends Extension {
     8     function ShowCalendar($url = false) {
     9         $filter = ($url) ? "URLSegment = '".Convert::raw2sql($url)."'" : null;
    10         $eventHolder = DataObject::get_one('EventHolder', $filter);
    11         if ($eventHolder) {
    12             $calendar = $eventHolder->getCalendar('');
    13             return $calendar->renderWith('EventCalendarWidget');
    14         }
    15         return false;
    16     }
    17 }

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -