<?php defined('MW_PATH') || exit('No direct script access allowed');

/**
 * ArticleCategoriesWidget
 * 
 * @package MailWizz EMA
 * @author Serban George Cristian <cristian.serban@mailwizz.com> 
 * @link http://www.mailwizz.com/
 * @copyright 2013-2014 MailWizz EMA (http://www.mailwizz.com)
 * @license http://www.mailwizz.com/license/
 * @since 1.0
 */
 
class MegamenuWidget extends CWidget
{
     
    
    public function run()
    {
	 
		 // $model = Section::model()->listData();
			$section  =  Section::model()->auto_prioritySection(Yii::app()->params['auto']);
			$deals  =  Section::model()->auto_prioritySection(Yii::app()->params['deals']);
			$classifieds = Category::model()->getCatgeory(Yii::app()->params['classifieds']);
			//$for_rent = Category::model()->getCatgeory(Yii::app()->params['for_rent']);
			$for_rent = Section::model()->auto_prioritySection(Yii::app()->params['for_rent']);
			//$for_sale = Category::model()->getCatgeory(Yii::app()->params['for_sale']);
			$for_sale = Section::model()->auto_prioritySection(Yii::app()->params['for_sale']);
			$matrimonial = Category::model()->getCatgeory(Yii::app()->params['matrimonial']);
			$jobs = Category::model()->getCatgeory(Yii::app()->params['jobs']);
			$travel  = Section::model()->auto_prioritySection(Yii::app()->params['travel']);
			$dirctory  = Section::model()->auto_prioritySection(Yii::app()->params['dirctory']);
			$this->render('menu',compact('section','classifieds','for_rent','for_sale','matrimonial','jobs','deals','travel','dirctory'));
    }
}
