示例#1
0
 private function tester()
 {
     //error_reporting(E_ALL);ini_set('display_errors', 'on');
     $search = new SettleGeoSearch();
     $this->getOutput()->addModules(SettleGeoSearch::getModules());
     $this->getOutput()->addHTML($search->getHtml());
 }
示例#2
0
 /**
  * Initializes output page and sets up skin-specific parameters
  * @param OutputPage $out Object to initialize
  */
 public function initPage(OutputPage $out)
 {
     parent::initPage($out);
     $title = $out->getTitle();
     $isCard = false;
     if ($title && $title->exists()) {
         $categoris = SFUtils::getCategoriesForPage($title);
         if (in_array('Card', $categoris)) {
             if (!$out->getRequest()->getVal('action') || $out->getRequest()->getVal('action') == 'view') {
                 $isCard = true;
             }
         }
     }
     if ($title && $title->exists() && $title->getNamespace() == NS_MAIN) {
         if ($title->getArticleID() === Title::newMainPage()->getArticleID()) {
             $scripts = array('skins.settlein.js');
         } else {
             if ($isCard) {
                 $scripts = array('skins.settlein.page.js');
             } else {
                 $scripts = array('skins.settlein.js');
             }
         }
     } else {
         if ($isCard) {
             $scripts = array('skins.settlein.page.js');
         } else {
             $scripts = array('skins.settlein.js');
         }
     }
     //$out->addModules( $scripts );
     $out->addModules($scripts);
     if ($this->getUser() && $this->getUser()->isLoggedIn()) {
         $out->addModules('ext.settlegeoforminput.foo');
     }
     $out->addModules(SettleGeoSearch::getModules());
     $out->addMeta('viewport', 'width=device-width, initial-scale=1');
 }