Example #1
0
 /**
  * Текущий год
  *
  * @static
  * @return CTerm
  */
 public static function getCurrentYear()
 {
     if (is_null(self::$_currentYear)) {
         /**
                     foreach (CActiveRecordProvider::getAllFromTable(TABLE_SETTINGS)->getItems() as $setting) {
            self::$_currentYear = CTaxonomyManager::getYear($setting->getItemValue("year_id"));
                     }
         */
         self::$_currentYear = CTaxonomyManager::getYear(CSettingsManager::getSettingValue("current_year"));
     }
     return self::$_currentYear;
 }