Example #1
0
 /**
  * Gets a list of home_pages.  If the $_REQUEST['archived'] attribute
  * is true, will return the archived list.  Else will return the list
  * of non-archived home_pages.
  * @param object $mainframe The Joomla specific page object
  * @return bean the home_pages summary page model bean
  */
 private function setSummaryModel($mainframe)
 {
     global $logger;
     $logger->debug(get_class($this) . '::setSummaryModel()');
     $service = $this->getHomePageService();
     $model = new SummaryPageModel();
     $pubStates = null;
     if (isset($_REQUEST['archived'])) {
         $pubStates = array(PublicationState::ARCHIVED);
     }
     $logger->debug("Size of pubStates array: " . count($pubStates));
     $list = $service->getHomePagesByPubState($pubStates);
     $logger->debug("Size of home_pages array: " . count($list));
     // TODO Get Related Events
     $model->setHomePages($list);
     return $model;
 }