Exemplo n.º 1
0
 /**
  * Called when the page is set before rendering.
  *
  * This calendar caches the pictures and journals for the new page.
  *
  * @access private
  */
 protected function _page_changed()
 {
     $first_day = new DATE_TIME(mktime(0, 0, 0, $this->_curr_month, 1, $this->_curr_year));
     $last_day = new DATE_TIME(mktime(23, 59, 59, $this->_curr_month, $first_day->last_legal_day(), $this->_curr_year));
     $journal_query = $this->album->entry_query();
     $journal_query->set_type('journal');
     $journal_query->set_days($first_day->as_iso(), $last_day->as_iso());
     $this->_journals = $journal_query->objects();
     $picture_query = $this->album->entry_query();
     $picture_query->set_type('picture');
     $picture_query->set_days($first_day->as_iso(), $last_day->as_iso());
     $this->_pictures = $picture_query->objects();
 }