public function getFilterOptions()
 {
     $arrOptions = array();
     // needs to be overwritten in model, otherwise datacontainer argument in options_callback contains protected calendars
     $this->objModel->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
     $objForm = new EventFilterForm($this->objModel);
     $objForm->generate();
     $arrFields = $objForm->getFilterFields();
     if (!is_array($arrFields) || empty($arrFields)) {
         return $arrOptions;
     }
     $arrRestricedValueFields = deserialize($this->cal_restrictedValueFields, true);
     $arrEventTypeArchives = deserialize($this->cal_eventTypesArchive, true);
     foreach ($arrFields as $strName => $objWidget) {
         if (!is_array($objWidget->options)) {
             continue;
         }
         if (!in_array($strName, $arrRestricedValueFields)) {
             continue;
         }
         $arrFieldOptions = array();
         foreach ($objWidget->options as $arrOption) {
             foreach ($arrOption as $strKey => $varValue) {
                 // event types may be split into seperate lists
                 if (is_array($varValue) && $varValue['value'] == 'options') {
                     $arrFieldOptions = array_merge($arrFieldOptions, $varValue['label']);
                 } else {
                     if ($strKey == 'value' && $varValue != '') {
                         $arrFieldOptions[] = $varValue;
                     }
                 }
             }
         }
         if (!$this->cal_combineEventTypesArchive && count($arrEventTypeArchives) > 0 && strrpos($strName, 'eventtypes', -strlen($strName)) !== FALSE) {
             // use multiple eventtypes
             foreach ($arrEventTypeArchives as $intArchive) {
                 $strArchiveKey = $strName . '_' . $intArchive;
                 $arrOptions[$strArchiveKey] = $arrFieldOptions;
             }
         } else {
             $arrOptions[$strName] = $arrFieldOptions;
         }
     }
     return $arrOptions;
 }
SortableDataObject::add_sortable_class('LearnDownload');
SortableDataObject::add_sortable_class('LearnLink');
SortableDataObject::add_sortable_class('Staff');
SortableDataObject::add_sortable_class('Collaborator');
SortableDataObject::add_sortable_class('KeyContact');
SortableDataObject::add_sortable_class('MediaReleaseDownload');
SortableDataObject::add_sortable_class('MediaReleaseLink');
SortableDataObject::add_sortable_class('YoutubeLink');
SortableDataObject::add_sortable_class('ActionLink');
SortableDataObject::add_sortable_class('FormCategory');
SortableDataObject::add_sortable_class('FormItem');
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('lyc');
// Add custom SiteConfig data
DataObject::add_extension('SiteConfig', 'CustomSiteConfig');
Object::add_extension('DataObjectSet', 'DataObjectSetExtension');
//Object::add_extension('Member','MemberProfileExtension');
// log errors and warnings
//SS_Log::add_writer(new SS_LogFileWriter('/log'), SS_Log::WARN, '<=');
// or just errors
//SS_Log::add_writer(new SS_LogFileWriter('/log'), SS_Log::ERR);
ini_set('memory_limit', '1000M');
define('TESTING_ENTRY_FORM', false);
define('TESTING_EMAIL', '*****@*****.**');
define('EMAIL_ADMINS', 'davis.dimalen@gmail.com, davis.dimalen@gmail.com');
define('TOAST_ADMIN', '*****@*****.**');
$zend_lib_path = realpath('..' . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '_lib/ZendFramework/library';
set_include_path($zend_lib_path . PATH_SEPARATOR . get_include_path());
EventFilterForm::disable_all_security_tokens();