fix warnings

This commit is contained in:
Roland Schneider 2019-10-23 09:05:09 +02:00 committed by Roland Schneider
parent bf85c737d5
commit 9c0e2a56ee
8 changed files with 23 additions and 49 deletions

View File

@ -1,12 +1,12 @@
<?php <?php /** @noinspection PhpUnhandledExceptionInspection */
use common\modules\event\models\copy\CopyWeekSearch;
use kartik\widgets\DatePicker; use kartik\widgets\DatePicker;
use kartik\widgets\DateTimePicker;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\models\EventSearch */ /* @var $model CopyWeekSearch */
/* @var $form yii\widgets\ActiveForm */ /* @var $form yii\widgets\ActiveForm */
?> ?>

View File

@ -1,22 +1,19 @@
<?php <?php /** @noinspection PhpUnhandledExceptionInspection */
use common\modules\event\models\timetable\TimeTableSearch;
use kartik\widgets\DatePicker; use kartik\widgets\DatePicker;
use kartik\widgets\DateTimePicker;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model backend\models\EventSearch */ /* @var $model TimeTableSearch */
/* @var $form yii\widgets\ActiveForm */ /* @var $form yii\widgets\ActiveForm */
?> ?>
<div class="event-search"> <div class="event-search">
<?php $form = ActiveForm::begin([ <?php $form = ActiveForm::begin([
'action' => ['timetable'], 'action' => ['timetable'],
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title">Keresés</h3> <h3 class="panel-title">Keresés</h3>
@ -40,7 +37,5 @@ use yii\widgets\ActiveForm;
<?= Html::submitButton(Yii::t('event', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('event', 'Search'), ['class' => 'btn btn-primary']) ?>
</div> </div>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
</div> </div>

View File

@ -1,16 +1,13 @@
<?php use common\modules\event\models\copy\CopyWeekSearch; <?php /** @noinspection PhpUnhandledExceptionInspection */
use common\modules\event\models\copy\CopyWeekSearch;
use common\modules\event\widgets\timetable\TimeTableMonthView; use common\modules\event\widgets\timetable\TimeTableMonthView;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $tableHeaders string */ /* @var $tableHeaders string */
/* @var $model CopyWeekSearch */ /* @var $model CopyWeekSearch */
?>
use common\modules\event\models\timetable\TimeTableModel;
use yii\grid\GridView as GridViewAlias; ?>
<style>
</style>
<h1>Hét másolása</h1> <h1>Hét másolása</h1>
<?php <?php

View File

@ -1,4 +1,6 @@
<?php use common\modules\event\models\timetable\TimeTableSearch; <?php /** @noinspection PhpUnhandledExceptionInspection */
use common\modules\event\models\timetable\TimeTableSearch;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $tableHeaders string */ /* @var $tableHeaders string */
@ -14,17 +16,12 @@ use common\modules\event\models\timetable\TimeTableModel;
use common\modules\event\widgets\timetable\TimeTableMonthView; use common\modules\event\widgets\timetable\TimeTableMonthView;
?> ?>
<style>
</style>
<h1>Órarend</h1> <h1>Órarend</h1>
<?php echo $this->render('_timetable_search', ['model' => $model]); ?> <?php echo $this->render('_timetable_search', ['model' => $model]); ?>
<h2> <h2>
<?= $timeTable->interval->firstActiveDate->format("Y") ?> <?= $timeTable->interval->firstActiveDate->format('Y') ?>
- -
<?= $timeTable->interval->firstActiveDate->format("m") ?> <?= $timeTable->interval->firstActiveDate->format('m') ?>
</h2> </h2>
<?= TimeTableMonthView::widget(['timeTable' => $timeTable]) ?> <?= TimeTableMonthView::widget(['timeTable' => $timeTable]) ?>

View File

@ -1,7 +1,7 @@
<?php <?php
namespace common\modules\event\widgets\day; namespace common\modules\event\widgets\day;
use common\modules\event\models\timetable\TimeTableMonthDay; use common\modules\event\models\timetable\TimeTableMonthDay;
use yii\base\Widget; use yii\bootstrap\Widget;
/** @noinspection PhpUnused */ /** @noinspection PhpUnused */
@ -12,15 +12,10 @@ use yii\base\Widget;
* *
* @property TimeTableMonthDay $day * @property TimeTableMonthDay $day
*/ */
class TimeTableMonthDayView extends \yii\bootstrap\Widget class TimeTableMonthDayView extends Widget
{ {
public $day; public $day;
public function init(){
parent::init();
}
public function run(){ public function run(){
return $this->render('_day', [ 'day' => $this->day]); return $this->render('_day', [ 'day' => $this->day]);
} }

View File

@ -1,19 +1,17 @@
<?php <?php
namespace common\modules\event\widgets\event; namespace common\modules\event\widgets\event;
use common\models\Event; use common\models\Event;
use common\modules\event\models\timetable\TimeTableMonthDay; use DateTime;
use yii\base\Widget; use yii\bootstrap\Widget;
/** @noinspection PhpUnused */
/** /**
* Class TimeTableMonthDayView * Class TimeTableMonthDayView
* @package common\modules\event\widgets * @package common\modules\event\widgets
* *
* @property Event $event * @property Event $event
*/ */
class EventView extends \yii\bootstrap\Widget class EventView extends Widget
{ {
public $event; public $event;
public $start; public $start;
@ -22,9 +20,9 @@ class EventView extends \yii\bootstrap\Widget
public function init(){ public function init(){
parent::init(); parent::init();
if ( isset($this->event )){ if ( isset($this->event )){
$this->start = new \DateTime(); $this->start = new DateTime();
$this->start->setTimestamp($this->event->start); $this->start->setTimestamp($this->event->start);
$this->end = new \DateTime(); $this->end = new DateTime();
$this->end->setTimestamp($this->event->end); $this->end->setTimestamp($this->event->end);
} }
} }

View File

@ -5,9 +5,6 @@ use common\modules\event\models\timetable\TimeTableMonthWeek;
use common\modules\event\widgets\day\TimeTableMonthDayView; use common\modules\event\widgets\day\TimeTableMonthDayView;
use yii\bootstrap\Widget; use yii\bootstrap\Widget;
/** @noinspection PhpUnused */
/** /**
* Class TimeTableMonthDayView * Class TimeTableMonthDayView
* @package common\modules\event\widgets * @package common\modules\event\widgets

View File

@ -11,15 +11,10 @@ use common\modules\event\widgets\timetable\TimeTableMonthView;
use yii\grid\ActionColumn; use yii\grid\ActionColumn;
use yii\grid\GridView; use yii\grid\GridView;
?>
<?php
?> ?>
<?= GridView::widget([ <?= GridView::widget([
'dataProvider' => $timeTable->getWeeksArrayDataProvider(), 'dataProvider' => $timeTable->getWeeksArrayDataProvider(),
'layout' => '{items}',
'columns' => [ 'columns' => [
[ [
'attribute' => 'weekNumber', 'attribute' => 'weekNumber',