Blame view

protected/controllers/StoFilterController.php 1.06 KB
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
  <?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']);
  
4c373a79   Administrator   ашкые
25
26
27
28
29
30
31
          $brands = StoFilter::model()->findAll(array(
              'select'=>'brand',
              'group'=>'brand',
              'distinct'=>true,
              ));
  
  
f6e211e4   Administrator   finish work part 1
32
33
          $this->render('index', array(
              'content' => $data['content'],
4c373a79   Administrator   ашкые
34
              'brands' =>$brands
f6e211e4   Administrator   finish work part 1
35
36
          ));
      }
4c373a79   Administrator   ашкые
37
38
  
  
f6e211e4   Administrator   finish work part 1
39
  }