add registrations to customer gui
This commit is contained in:
56
customerapi/models/details/EventDetailsView.php
Normal file
56
customerapi/models/details/EventDetailsView.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace customerapi\models\details;
|
||||
|
||||
|
||||
use common\models\Event;
|
||||
|
||||
class EventDetailsView extends Event
|
||||
{
|
||||
|
||||
public $reservationCount;
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getTrainerClass()
|
||||
{
|
||||
// override trainer class to have more control
|
||||
// about json fields
|
||||
return TrainerDetailsView::class;
|
||||
}
|
||||
|
||||
protected function getEventTypeClass()
|
||||
{
|
||||
return EventTypeDetailsView::class;
|
||||
}
|
||||
|
||||
protected function getRoomClass()
|
||||
{
|
||||
return RoomDetailsView::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Override
|
||||
* @return array|false
|
||||
*/
|
||||
function fields()
|
||||
{
|
||||
|
||||
$fields = [
|
||||
"id" => "id",
|
||||
"start" => "start",
|
||||
"end" => "end",
|
||||
"seat_count" => "seat_count",
|
||||
"active" => "active",
|
||||
// "reservationCount" => "reservationCount"
|
||||
];
|
||||
$fields['trainer'] = 'trainer';
|
||||
$fields['eventType'] = 'eventType';
|
||||
$fields['room'] = 'room';
|
||||
return $fields;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user