SportSectionController.php
942 Bytes
<?php
class SportSectionController extends NodeSectionController
{
public function actionIndex()
{
/** @var $sportRoot SportRoot */
$sportRoot = SportRoot::model()->with('i18n')->findByPk($this->getRootNode()->data_id);
/** @var $textSection TextPage */
$textSection = TextPage::model()->with('i18n')->findByPk($this->getNode()->data_id);
$this->pageName = $textSection->i18n->page_name;
$this->setSEOParams($textSection->i18n->title, $textSection->i18n->keywords, $textSection->i18n->description);
$this->setContacts(explode(',', $textSection->contacts_data));
$this->setContacts(explode(',', $sportRoot->contacts_data));
$this->headerGalleryId = $sportRoot->header_gallery_id;
$this->sectionGalleryId = $textSection->header_gallery_id;
$this->render('index', array(
'content' => $textSection->i18n->content,
));
}
}