Annotation of db/prgsrc/drupal/modules/chgk_db/classes/DbPackage/DbPackageChamp.class.php, revision 1.4
1.1 roma7 1: <?php
2:
3: class DbPackageChamp extends DbPackage {
1.4 ! roma7 4: private $tours = FALSE;
1.2 roma7 5:
1.1 roma7 6: protected function setId() {
7: $this->id = str_replace('.txt', '', $this->tour->FileName);
8: }
1.2 roma7 9:
10: public function getAll() {
11: $this->loadTours();
12: }
13:
1.4 ! roma7 14: private function loadTours() {
! 15: if ($this->tours !== FALSE) {
! 16: return $this->tours;
! 17: }
! 18: $res = $this->db->getChildrenRes($this->getDbId());
1.2 roma7 19: while ($row = $this->db->fetch_row($res)) {
20: $this->tours[$row->Number] = new DbPackageTour($row, $this);
21: $this->tours[$row->Number] -> loadQuestions();
22: }
23: }
1.4 ! roma7 24: /* public function getPrintVersion() {
! 25: $this->loadTours();
! 26: $content = theme('chgk_db_champ_full', $this);
! 27: return theme('chgk_db_print', $this->getTitle(), $content);
! 28: }
! 29: */
! 30:
! 31: public function loadChildren() {
! 32: $this->children = array();
1.2 roma7 33: }
34:
35: public function getTours() {
36: return $this->tours;
37: }
38: public function isSingleTour() {
39: return sizeof($this->tours)==1;
40: }
1.3 roma7 41:
42: public function getImages() {
43: $this->images = array();
44: foreach ($this->tours as $t) {
45: $this->images = array_merge($this->images, $t->getImages());
46: }
47: return $this->images;
48: }
1.4 ! roma7 49:
! 50: public function getFb2MainPart() {
! 51: return theme('chgk_db_tours_fb2', $this);
! 52: }
! 53:
! 54: public function getHtmlContent() {
! 55: $this->loadTours();
! 56: return theme('chgk_db_champ_full', $this);
! 57: }
! 58:
! 59: public function hasPrintVersion() {
! 60: return TRUE;
! 61: }
! 62:
! 63: public function hasFb2() {
! 64: return TRUE;
1.3 roma7 65: }
1.4 ! roma7 66:
1.1 roma7 67: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>