public function setPage($context)
 {
     // Check to see if the page has 'etf' page type
     if (is_array($context['page_data']['type']) && in_array('etf', $context['page_data']['type'])) {
         // Check to see that the page has been requested by someone who is logged in
         // or someone who has passed the ETF header
         if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'EmailTemplateFilter' || Frontend::instance()->isLoggedIn() && Frontend::instance()->Author->isDeveloper()) {
             // All good!
             self::$page = $context['page'];
         } else {
             $row = Symphony::Database()->fetchRow(0, "\n\t\t\t\t\t\tSELECT `tbl_pages`.*\n\t\t\t\t\t\tFROM `tbl_pages`, `tbl_pages_types`\n\t\t\t\t\t\tWHERE `tbl_pages_types`.page_id = `tbl_pages`.id\n\t\t\t\t\t\tAND tbl_pages_types.`type` = '403'\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t");
             if ($row) {
                 $row['type'] = FrontendPage::fetchPageTypes($row['id']);
                 $row['filelocation'] = FrontendPage::resolvePageFileLocation($row['path'], $row['handle']);
                 $context['page_data'] = $row;
                 return;
             } else {
                 GenericExceptionHandler::$enabled = true;
                 throw new SymphonyErrorPage(__('Please <a href="%s">login</a> to view this page.', array(SYMPHONY_URL . '/login/')), __('Forbidden'), 'error', array('header' => 'HTTP/1.0 403 Forbidden'));
             }
         }
     }
 }
 public function setPage($context)
 {
     self::$page = $context['page'];
 }