Blame view

protected/controllers/StoFilterController.php 894 Bytes
f6e211e4   Administrator   finish work part 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  <?php
  
  class StoFilterController extends Controller
  {
  
      /** @var array General Section Params */
      public $generalData;
  
      public function init()
      {
          parent::init();
          /** @var $sectionData StaticData */
          $sectionData = StaticData::model()->with('i18n')->findByPk(array('section' => $this->id, 'key' => 'general'));
          $this->generalData = $sectionData->getDataAttributes() + $sectionData->i18n->getDataAttributes();
          $this->headerGalleryId = $this->generalData['gallery_id'];
      }
  
      public function actionIndex(){
          $data = $this->loadStaticPage($this->id, $this->action->id);
          $this->sectionGalleryId = $data['gallery_id'];
  
          $this->setContacts($data['contacts']);
          $this->setContacts($this->generalData['contacts']);
  
          $this->render('index', array(
              'content' => $data['content'],
          ));
      }
  }