Exemple #1
0
 public function run()
 {
     if ($this->position == ContentBlocks::POS_NONE) {
         return;
     }
     $contentBlock = ContentBlocks::model()->onSite()->byPosition($this->position)->find();
     if (empty($contentBlock)) {
         return;
     }
     $this->render('contentBlock', array('contentBlock' => $contentBlock, 'showTitle' => $this->showTitle));
 }
 public function getTableColumns()
 {
     $attributes = array('id', 'title', $this->getSelectColumn('position', ContentBlocks::getPosNames()), $this->getVisibleColumn(), $this->getButtonsColumn());
     return $attributes;
 }