/**
  * Get all eventtypesarchives and return them as array
  *
  * @return array
  */
 public function getEventTypesArchive($dc)
 {
     $arrOptions = array();
     $arrCalendars = deserialize($dc->activeRecord->cal_calendar, true);
     $objArchives = \HeimrichHannot\CalendarPlus\CalendarEventtypesArchiveModel::findByPids($arrCalendars);
     if ($objArchives === null) {
         return $arrOptions;
     }
     return $objArchives->fetchEach('title');
 }
 public static function getEventTypesSelectOptions(\DataContainer $dc)
 {
     $arrItems = array();
     if (!is_array($dc->objModule->cal_calendar) || empty($dc->objModule->cal_calendar)) {
         return $arrItems;
     }
     $strCacheKey = 'eventtypes_select_options_' . implode('_', $dc->objModule->cal_calendar);
     if (FileCache::getInstance()->isExisting($strCacheKey)) {
         return FileCache::getInstance()->get($strCacheKey);
     }
     $objArchives = CalendarEventtypesArchiveModel::findByPids($dc->objModule->cal_calendar);
     if ($objArchives === null) {
         return $arrItems;
     }
     $objEvenTypes = CalendarEventtypesModel::findByPids($objArchives->fetchEach('id'));
     if ($objEvenTypes === null) {
         return $arrItems;
     }
     $arrItems = $objEvenTypes->fetchEach('title');
     FileCache::getInstance()->set($strCacheKey, $arrItems);
     return $arrItems;
 }