public static function loadData() {
		if(static::$arrDBCalendar === null) {
			$years = \Database::getInstance()->prepare("SELECT * FROM tl_schoolyear")->execute();
			while($arrSY = $years->fetchAssoc()) {
				static::$arrDBCalendar[$arrSY['id']] = $arrSY;
			}
			$holidays = \Database::getInstance()->prepare("SELECT * FROM tl_schoolyear_holiday")->execute();
			while($arrHD = $holidays->fetchAssoc()) {
				static::$arrDBCalendar[$arrHD['pid']]['holidays'][$arrHD['id']] = $arrHD;
			}
		}
		return true;
	}
public static function loadData() {
		if(static::$arrDBCalendar === null) {
			$years = \Database::getInstance()->prepare("SELECT * FROM tl_schoolyear")->execute();
			while($arrSY = $years->fetchAssoc()) {
				static::$arrDBCalendar[$arrSY['id']] = $arrSY;
			}
			$holidays = \Database::getInstance()->prepare("SELECT * FROM tl_schoolyear_holiday")->execute();
			while($arrHD = $holidays->fetchAssoc()) {
				static::$arrDBCalendar[$arrHD['pid']]['holidays'][$arrHD['id']] = $arrHD;
			}
		}
		return true;
	}
public static function loadData ( ) { if ( static :: $ arrDBCalendar === null ) { $ years = \ Database :: getInstance ( ) -> prepare ( "SELECT * FROM tl_schoolyear" ) -> execute ( ) ; while ( $ arrSY = $ years -> fetchAssoc ( ) ) { static :: $ arrDBCalendar [ $ arrSY [ 'id' ] ] = $ arrSY ; } $ holidays = \ Database :: getInstance ( ) -> prepare ( "SELECT * FROM tl_schoolyear_holiday" ) -> execute ( ) ; while ( $ arrHD = $ holidays -> fetchAssoc ( ) ) { static :: $ arrDBCalendar [ $ arrHD [ 'pid' ] ] [ 'holidays' ] [ $ arrHD [ 'id' ] ] = $ arrHD ; } } return true ; }
Load School Years and Holidays
@var $arrDBCalendar
Load School Years and Holidays