/**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $subMenuTitle, $objTemplate;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             define('CALENDAR_MANDATE', MODULE_INDEX);
             $objCalendar = new \Cx\Modules\Calendar\Controller\Calendar($page->getContent(), MODULE_INDEX);
             $page->setContent($objCalendar->getCalendarPage());
             if ($objCalendar->pageTitle) {
                 $page->setTitle($objCalendar->pageTitle);
                 $page->setContentTitle($objCalendar->pageTitle);
                 $page->setMetaTitle($objCalendar->pageTitle);
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(16, 'static');
             $subMenuTitle = $_CORELANG['TXT_CALENDAR'];
             $objCalendarManager = new \Cx\Modules\Calendar\Controller\CalendarManager();
             $objCalendarManager->getCalendarPage();
             break;
         default:
             break;
     }
 }
 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $_CORELANG, $objTemplate, $subMenuTitle;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             $newsObj = new News($page->getContent());
             $page->setContent($newsObj->getNewsPage());
             $newsObj->getPageTitle($page->getTitle());
             if (substr($page->getCmd(), 0, 7) == 'details') {
                 $page->setTitle($newsObj->newsTitle);
                 $page->setContentTitle($newsObj->newsTitle);
                 $page->setMetaTitle($newsObj->newsTitle);
                 // Set the meta page description to the teaser text if displaying news details
                 $teaser = $newsObj->getTeaser();
                 if ($teaser !== null) {
                     $page->setMetadesc(contrexx_raw2xhtml(contrexx_strip_tags(html_entity_decode($teaser, ENT_QUOTES, CONTREXX_CHARSET))));
                 }
             }
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             \Permission::checkAccess(10, 'static');
             $subMenuTitle = $_CORELANG['TXT_NEWS_MANAGER'];
             $objNews = new NewsManager();
             $objNews->getPage();
             break;
         default:
             break;
     }
 }
 public function setTitle($title)
 {
     $this->_load();
     return parent::setTitle($title);
 }