

<?php

Yii::import('zii.widgets.CMenu', true);

class KategoriPanel extends CMenu
{
        public function init()
        {
        		$criteria = new CDbCriteria();
        		$criteria->order = 'id DESC';
        		//$criteria->limit = '';
        

                $items=Periode::model()->findAll($criteria);
                foreach ($items as $item)
                 //   $this->items[] = array('label'=>$item->kategory, 'url'=>array( Yii::app()->controller->id , 'ad'=>$item->id));//to all modul
              //echo "<li>".CHtml::link($item->keterangan,array('Periode/view','id'=>$item->id))."</li>";

           echo "<li>". CHtml::link("<i class='glyphicon glyphicon-calendar' aria-hidden='true'></i><span> " .$item->keterangan."</span><span class='pull-right-container'>
              <small class='label pull-right bg-green'><i class='glyphicon glyphicon-calendar' aria-hidden='true'></i></small>
            </span>",array('Periode/view','id'=>$item->id)) ."</li>";
            

        }

      
}



