274dfad9b4
POST /api/v1/summits/{id}/speakers-assistances/{assistance_id}/mail Change-Id: If503533f524f629d369209ae4832d80487af822d
79 lines
1.9 KiB
PHP
79 lines
1.9 KiB
PHP
<?php namespace models\summit;
|
|
/**
|
|
* Copyright 2018 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.
|
|
**/
|
|
use Doctrine\ORM\Mapping AS ORM;
|
|
use models\utils\SilverstripeBaseModel;
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="SpeakerLanguage")
|
|
* Class SpeakerLanguage
|
|
* @package models\summit
|
|
*/
|
|
class SpeakerLanguage extends SilverstripeBaseModel
|
|
{
|
|
/**
|
|
* @ORM\Column(name="Language", type="string")
|
|
*/
|
|
private $language;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="PresentationSpeaker", inversedBy="languages")
|
|
* @ORM\JoinColumn(name="SpeakerID", referencedColumnName="ID")
|
|
* @var PresentationSpeaker
|
|
*/
|
|
private $speaker;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getLanguage()
|
|
{
|
|
return $this->language;
|
|
}
|
|
|
|
/**
|
|
* @param string $language
|
|
*/
|
|
public function setLanguage($language)
|
|
{
|
|
$this->language = $language;
|
|
}
|
|
|
|
/**
|
|
* @return PresentationSpeaker
|
|
*/
|
|
public function getSpeaker()
|
|
{
|
|
return $this->speaker;
|
|
}
|
|
|
|
/**
|
|
* @param PresentationSpeaker $speaker
|
|
*/
|
|
public function setSpeaker($speaker)
|
|
{
|
|
$this->speaker = $speaker;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getSpeakerId(){
|
|
try {
|
|
return !is_null($this->speaker) ? $this->speaker->getId() : 0;
|
|
}
|
|
catch(\Exception $ex){
|
|
return 0;
|
|
}
|
|
}
|
|
} |