/** * The default execute method. * @param Joomla mainframe object * @return bean page model */ function execute($mainframe) { echo "FRONT HOMEPAGE ACTION"; global $logger; $logger->debug(get_class($this) . '::execute()'); $model = new DetailPageModel(); $hps = $this->getHomepageService(); $hp = $hps->getCurrentHomePage(); // load the galleries for ($i = 1; $i < 10; $i++) { $getter = "getEvent" . $i; $event = $hp->{$getter}(); if ($event != null) { $setter = "setEvent" . $i; $event = $this->setGallery($event, true); // in the MasterAction class $hp->{$setter}($event); } } $model->setDetail($hp); // announcment $ans = $this->getAnnouncementService(); $annc = $ans->getAnnouncement('Exhibition', true, true); // get any old announcment object, then pull the global $model->setAnnouncement($annc->getGlobal()); return $model; }
/** * Process the incoming request for the detailed * view of the given Program oid */ public function detail($mainframe = null) { // If there is not an oid in the request, redirect to the summary if (!isset($_REQUEST['oid'])) { $this->summary(); } $es = $this->getEventService(); $jcs = $this->getJoomlaContentService(); $model = new DetailPageModel(); // get the Program bean $prgm = $es->getEventById('Program', $_REQUEST['oid']); // get the gallery $prgm = $this->setGallery($prgm, false, false); // in the MasterAction class // get the related content $articles = array(); if ($prgm->getRelatedArticles()) { $articles = $jcs->getArticlesByCategory($prgm->getRelatedArticles()); $prgm->setRelatedArticles($articles); } // get the comments $comments = array(); if ($prgm->getCommentArticle()) { $comments = $jcs->getFeaturedComments($prgm->getCommentArticle()); $prgm->setCommentArticle($comments); } $model->setDetail($prgm); return $model; }
/** * Process the incoming request for the detailed * view of the given Program oid */ public function detail($mainframe) { global $logger; $logger->debug(get_class($this) . "::detail()"); $vs = $this->getVenueService(); $model = new DetailPageModel(); // get the Venue bean $vnue = $vs->getVenueById($_REQUEST['oid']); // Gallery $vnue = $this->setGallery($vnue); // in the MasterAction class $model->setDetail($vnue); return $model; }
/** * Loads the image information for the given highlight id * @param object A joomla mainframe object (or extended mainframe) * @return bean A DetailPageModel bean. */ function highlight($mainframe = null) { global $logger; $logger->debug(get_class($this) . '::highlight()'); $model = new DetailPageModel(); $id = $_REQUEST['eid']; // Gallery2 element id $gs = $this->getGalleryService(); $highlight = $gs->getPackagedImage($id); $model->setDetail($highlight); return $model; }
/** * Updates a program by given oid. If there is no oid * it will invoke the create method. Will also assign * related events and venues. * @param object $mainframe The Joomla specific page object * @return bean DetailPageModel */ protected function update($mainframe) { global $logger; $logger->debug(get_class($this) . "::update()"); $bean = $this->getBeanFromRequest(); $service = $this->getEventService(); $model = new DetailPageModel(); // is this a new event if ($bean->getOid() == null) { $logger->debug("No event id found."); return $this->create($mainframe); } // Update the venue $updated = $service->updateEvent('Program', $bean); // Populate the page model $model->setDetail($updated); $model->setOptions($this->getDetailOptions()); return $model; }
/** * Returns the populated detail page model * @param object $mainframe The Joomla specific page object * @return bean the detail page model bean */ private function setDetailModel($mainframe) { global $logger; $logger->debug(get_class($this) . "::setDetailModel()"); $model = new DetailPageModel(); $service = $this->getPersonService(); if (!isset($_REQUEST['oid'])) { return $this->setSummaryModel($mainframe); } $detail = $service->getPersonById('Artist', $_REQUEST['oid']); $model->setDetail($detail); $model->setOptions($this->getDetailOptions()); return $model; }
/** * Returns the populated detail page model * @param object $mainframe The Joomla specific page object * @return bean the detail page model bean */ protected function setDetailModel($mainframe) { global $logger; $logger->debug(get_class($this) . "::setDetailModel()"); $model = new DetailPageModel(); $cs = $this->getCategoryService(); if (!isset($_REQUEST['oid'])) { return $this->setSummaryModel($mainframe); } $detail = $cs->getCategoryById($_REQUEST['oid']); $model->setDetail($detail); $model->setOptions($this->getDetailOptions()); return $model; }
/** * Returns a DetailPageModel bean for the given oid * * @access private * @param int/string the oid for the target venue * @return bean DetailPageModel */ protected function setDetailModel($oid) { global $logger; $logger->debug(get_class($this) . "::setDetailModel({$oid})"); if ($oid == null) { trigger_error("Missing required OID.", E_USER_ERROR); return; } $es = $this->getEventService(); $dpm = new DetailPageModel(); $bean = $es->getEventById('Exhibition', $oid); $dpm->setDetail($bean); $artists = $bean->getArtists(); $options = $this->getDetailOptions(); $options['artifact'] = $this->getArtifactOptions($artists); $dpm->setOptions($options); return $dpm; }