Esempio n. 1
0
 public function view()
 {
     $b = $this->getBlockObject();
     $a = $b->getBlockAreaObject();
     $this->arLayout = $this->getAreaLayoutObject();
     if (is_object($this->arLayout)) {
         $this->arLayout->setAreaObject($a);
         $this->set('columns', $this->arLayout->getAreaLayoutColumns());
         $c = Page::getCurrentPage();
         $this->set('c', $c);
         if ($this->arLayout->isAreaLayoutUsingThemeGridFramework()) {
             $pt = $c->getCollectionThemeObject();
             $gf = $pt->getThemeGridFrameworkObject();
         }
         if (isset($gf) && is_object($gf)) {
             $this->set('gf', $gf);
             $this->render('view_grid');
         } else {
             $asset = new CssAsset();
             $asset->setAssetURL(URL::to('/ccm/system/css/layout', $this->bID));
             $asset->setAssetSupportsMinification(false);
             $asset->setAssetSupportsCombination(false);
             $this->requireAsset($asset);
             $this->render('view');
         }
     } else {
         $this->set('columns', array());
     }
 }
Esempio n. 2
0
 public function view()
 {
     $b = $this->getBlockObject();
     $a = $b->getBlockAreaObject();
     $this->arLayout = $this->getAreaLayoutObject();
     if (is_object($this->arLayout)) {
         $this->arLayout->setAreaObject($a);
         $this->set('columns', $this->arLayout->getAreaLayoutColumns());
         $c = Page::getCurrentPage();
         $this->set('c', $c);
         $gf = false;
         if ($this->arLayout->isAreaLayoutUsingThemeGridFramework()) {
             $pt = $c->getCollectionThemeObject();
             $gf = $pt->getThemeGridFrameworkObject();
         }
         if ($this->arLayout instanceof CustomLayout) {
             $asset = new CssAsset();
             $asset->setAssetURL(URL::to('/ccm/system/css/layout', $this->arLayout->getAreaLayoutID()));
             $asset->setAssetSupportsMinification(false);
             $asset->setAssetSupportsCombination(false);
             $this->requireAsset($asset);
         }
         $formatter = $this->arLayout->getFormatter();
         $this->set('formatter', $formatter);
     } else {
         $this->set('columns', array());
     }
 }