/** * Outputs the object for print preview. * @param JOURNAL $entry * @access private */ protected function _display_as_printable($entry) { parent::_display_as_printable($entry); if ($this->_options->show_pictures) { $curr_date = date('Y-m-d', $entry->date->as_php()); if (!isset($this->last_date) || !$entry->date->equals($this->last_date, Date_time_date_part)) { // only show pictures with the first journal of a new day $this->last_date = $curr_date; $pic_query = $entry->picture_query(); $num_pics = $pic_query->size(); if ($num_pics > 0) { $class_name = $this->app->final_class_name('PICTURE_GRID', 'albums/gui/picture_grid.php'); /** @var PICTURE_GRID $grid */ $grid = new $class_name($this->app); $grid->description_length = 0; // no truncation $grid->show_controls = false; $grid->show_date = false; $grid->show_page_breaks = true; $grid->set_page_size(Default_page_size * 10); $grid->set_query($pic_query); $grid->display(); } } } }