private function get_day_header_values() { DateTool::set_current_locale($this->locale); $format = ''; switch ($this->display_mode) { case self::DISPLAY_MODE_MONTH: $format = $this->month_day_header_format; break; case self::DISPLAY_MODE_DAY: case self::DISPLAY_MODE_DAY_HOUR: $format = $this->day_day_header_format; break; case self::DISPLAY_MODE_WEEK: case self::DISPLAY_MODE_WEEK_HOUR: $format = $this->week_day_header_format; break; } if ($this->display_day_names || $this->display_mode == self::DISPLAY_MODE_WEEK || $this->display_mode == self::DISPLAY_MODE_WEEK_HOUR || $this->display_mode == self::DISPLAY_MODE_MONTH || $this->display_mode == self::DISPLAY_MODE_DAY || $this->display_mode == self::DISPLAY_MODE_DAY_HOUR) { $day_names = array(); $date_cursor = $this->first_date_to_show; if ($this->display_mode == self::DISPLAY_MODE_DAY || $this->display_mode == self::DISPLAY_MODE_DAY_HOUR) { $day_names[1] = strftime($format, strtotime($date_cursor)); $date_cursor = date('Y-m-d', strtotime($date_cursor . ' +1 day')); } else { for ($i = 1; $i <= 7; $i++) { $day_names[$i] = strftime($format, strtotime($date_cursor)); $date_cursor = date('Y-m-d', strtotime($date_cursor . ' +1 day')); } } } return $day_names; }
<?php /* * Load all files in alaxos/libs folder * * Note: The path to the lib folder is relative to the current file * If you copy this code into your APP bootstrap.php file, adapt the folder path * Alternatively, you can call the Alaxos plugin bootstrap.php file from within your APP bootstrap.php file like this: * * require_once(ROOT . DS . 'plugins' . DS . 'alaxos' . DS . 'config' . DS . 'bootstrap.php'); * or * require_once(APP . DS . 'plugins' . DS . 'alaxos' . DS . 'config' . DS . 'bootstrap.php'); */ $f = new Folder(dirname(__FILE__) . DS . '..' . DS . 'libs'); $files = $f->read(); foreach ($files[1] as $file) { if ($file != 'additional_translations.php') { require_once $f->path . $file; } } /* * Some functions of the Alaxos plugin need to have a locale set. By default, a locale is set below to make them work. * * But this is up to you to use the DateTool :: set_current_locale() function in your application to modify this default locale. * * Don't modify it below, but do it for instance in the beforeFilter() function of your AppController. * This will prevent to forget to modify it again whenever you make an Alaxos plugin update. */ DateTool::set_current_locale('en');