Merge "Added missing serializer"
This commit is contained in:
commit
ae40c2bb12
@ -203,7 +203,7 @@ final class SerializerRegistry
|
||||
|
||||
$this->registry['SummitCategoryChange'] = SummitCategoryChangeSerializer::class;
|
||||
// track chairs
|
||||
|
||||
$this->registry['PresentationTrackChairView'] = PresentationTrackChairViewSerializer::class;
|
||||
$this->registry['SummitSelectedPresentationList'] = SummitSelectedPresentationListSerializer::class;
|
||||
$this->registry['SummitSelectedPresentation'] = SummitSelectedPresentationSerializer::class;
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
<?php namespace ModelSerializers;
|
||||
/**
|
||||
* Copyright 2021 OpenStack Foundation
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
/**
|
||||
* Class PresentationTrackChairViewSerializer
|
||||
* @package ModelSerializers
|
||||
*/
|
||||
final class PresentationTrackChairViewSerializer extends SilverStripeSerializer
|
||||
{
|
||||
protected static $array_mappings = [
|
||||
'ViewerId' => 'viewer_id:json_int',
|
||||
'PresentationId' => 'presentation_id:json_int',
|
||||
];
|
||||
}
|
@ -15,6 +15,7 @@ use Doctrine\ORM\Mapping AS ORM;
|
||||
use models\main\Member;
|
||||
use models\summit\Presentation;
|
||||
use models\utils\SilverstripeBaseModel;
|
||||
use models\utils\One2ManyPropertyTrait;
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="PresentationTrackChairView")
|
||||
@ -23,6 +24,18 @@ use models\utils\SilverstripeBaseModel;
|
||||
*/
|
||||
class PresentationTrackChairView extends SilverstripeBaseModel
|
||||
{
|
||||
use One2ManyPropertyTrait;
|
||||
|
||||
protected $getIdMappings = [
|
||||
'getViewerId' => 'viewer',
|
||||
'getPresentationId' => 'presentation',
|
||||
];
|
||||
|
||||
protected $hasPropertyMappings = [
|
||||
'hasViewer' => 'viewer',
|
||||
'hasPresentation' => 'presentation',
|
||||
];
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="models\main\Member")
|
||||
* @ORM\JoinColumn(name="TrackChairID", referencedColumnName="ID", onDelete="SET NULL")
|
||||
|
Loading…
x
Reference in New Issue
Block a user