Blame view

protected/controllers/AboutController.php 834 Bytes
a1684257   Administrator   first commit
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
  <?php
  
  class AboutController extends NodeSiteController
  {
      /** @var AboutRoot */
      public $aboutRoot;
  
      public function init()
      {
          parent::init();
          $this->aboutRoot = AboutRoot::model()->with('i18n')->findByPk($this->getNode()->data_id);
          $this->headerGalleryId = $this->aboutRoot->header_gallery_id;
      }
  
      public function actionIndex()
      {
          $this->pageName = $this->aboutRoot->i18n->page_name;
          $this->setSEOParams($this->aboutRoot->i18n->title, $this->aboutRoot->i18n->keywords, $this->aboutRoot->i18n->description);
  
          $this->sectionGalleryId = $this->aboutRoot->header_gallery_id;
          $this->setContacts(explode(',',$this->aboutRoot->contacts_data));
  
          $this->render('index', array(
              'content' => $this->aboutRoot->i18n->content,
          ));
      }
  }