找不到类'yii2fullcalendar \ models \ Event'

时间:2015-12-08 07:46:33

标签: yii2 yii2-extension

我正在尝试使用philippfrenzel/yii2fullcalendar

但我得到了这个错误

  

PHP致命错误 - yii \ base \ ErrorException   找不到“yii2fullcalendar\models\Event”类

我有以下代码:

 public function actionBooking()
{
   $events = array();
   //Testing
   $Event = new \yii2fullcalendar\models\Event();
   $Event->id = 1;
   $Event->title = 'Testing';
   $Event->start = date('Y-m-d\TH:m:s\Z');
   $events[] = $Event;

   $Event = new \yii2fullcalendar\modelsEvent();
   $Event->id = 2;
   $Event->title = 'Testing';
   $Event->start = date('Y-m-d\TH:m:s\Z',strtotime('tomorrow 6am'));
   $events[] = $Event;
 ?>

 <div class="calendar-index">
<?php echo \yii2fullcalendar\yii2fullcalendar::widget(array(
  'events'=> $events,
 ));
 echo '</div>';
}

0 个答案:

没有答案