
POST /api/v1/summits/{id}/presentations scopes * summits/write * summits/write-event * summits/write-presentation payload * 'title' => 'required|string|max:100' * 'description' => 'required|string' * 'social_description' => 'required|string|max:100' * 'level' => 'required|in:Beginner,Intermediate,Advanced,N/A' * 'attendees_expected_learnt' => 'required|string|max:1000' * 'type_id' => 'required|integer' * 'track_id' => 'required|integer' * 'attending_media' => 'required|boolean' * 'links' => 'required|url_array' * 'extra_questions' => 'sometimes|entity_value_array' PUT api/v1/summits/{id}/presentations/{presentation_id} scopes * summits/write * summits/write-event * summits/write-presentation * 'title' => 'sometimes|string|max:100' * 'description' => 'sometimes|string' * 'social_description' => 'sometimes|string|max:100' * 'level' => 'sometimes|in:Beginner,Intermediate,Advanced,N/A' * 'attendees_expected_learnt' => 'sometimes|string|max:1000' * 'type_id' => 'sometimes|integer' * 'track_id' => 'sometimes|integer' * 'attending_media' => 'sometimes|boolean' * 'links' => 'sometimes|url_array' * 'extra_questions' => 'sometimes|entity_value_array' Change-Id: Iadc8bf072491a64ef48a1b475b36b92c2fe1d707
121 lines
3.1 KiB
PHP
121 lines
3.1 KiB
PHP
<?php namespace App\Models\Foundation\Summit\Events\Presentations\TrackQuestions;
|
|
/**
|
|
* 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\Common\Collections\ArrayCollection;
|
|
use Doctrine\ORM\Mapping AS ORM;
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="TrackMultiValueQuestionTemplate")
|
|
* Class TrackMultiValueQuestionTemplate
|
|
* @package App\Models\Foundation\Summit\Events\Presentations\TrackQuestions
|
|
*/
|
|
class TrackMultiValueQuestionTemplate extends TrackQuestionTemplate
|
|
{
|
|
|
|
/**
|
|
* @ORM\Column(name="EmptyString", type="string")
|
|
* @var string
|
|
*/
|
|
protected $empty_string;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="TrackQuestionValueTemplate", mappedBy="owner", cascade={"persist"})
|
|
* @var TrackQuestionValueTemplate[]
|
|
*/
|
|
protected $values;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="TrackQuestionValueTemplate", fetch="EXTRA_LAZY")
|
|
* @ORM\JoinColumn(name="DefaultValueID", referencedColumnName="ID", onDelete="SET NULL")
|
|
* @var TrackQuestionValueTemplate
|
|
*/
|
|
protected $default_value;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->values = new ArrayCollection;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getEmptyString()
|
|
{
|
|
return $this->empty_string;
|
|
}
|
|
|
|
/**
|
|
* @param string $empty_string
|
|
*/
|
|
public function setEmptyString($empty_string)
|
|
{
|
|
$this->empty_string = $empty_string;
|
|
}
|
|
|
|
/**
|
|
* @return TrackQuestionValueTemplate[]
|
|
*/
|
|
public function getValues()
|
|
{
|
|
return $this->values;
|
|
}
|
|
|
|
/**
|
|
* @param TrackQuestionValueTemplate[] $values
|
|
*/
|
|
public function setValues($values)
|
|
{
|
|
$this->values = $values;
|
|
}
|
|
|
|
/**
|
|
* @return TrackQuestionValueTemplate
|
|
*/
|
|
public function getDefaultValue()
|
|
{
|
|
return $this->default_value;
|
|
}
|
|
|
|
/**
|
|
* @param TrackQuestionValueTemplate $default_value
|
|
*/
|
|
public function setDefaultValue($default_value)
|
|
{
|
|
$this->default_value = $default_value;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getClassName(){
|
|
return self::ClassName;
|
|
}
|
|
|
|
const ClassName = 'TrackMultiValueQuestionTemplate';
|
|
|
|
public static $metadata = [
|
|
'class_name' => self::ClassName,
|
|
'empty_string' => 'string',
|
|
'default_value_id' => 'int',
|
|
'values' => 'array'
|
|
];
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public static function getMetadata(){
|
|
return array_merge(TrackQuestionTemplate::getMetadata(), self::$metadata);
|
|
}
|
|
|
|
} |