Refactored Presentation Object Mapping
Removed fields * LightningTalk * FeatureCloud Added field * AttendingMedia Change-Id: I976d0b29d5bd0af0d72175522cc76160697cf90b
This commit is contained in:
parent
121d2041ac
commit
536b81e77d
|
@ -25,7 +25,7 @@ class PresentationSerializer extends SummitEventSerializer
|
|||
'ProblemAddressed' => 'problem_addressed:json_string',
|
||||
'AttendeesExpectedLearnt' => 'attendees_expected_learnt:json_string',
|
||||
'ToRecord' => 'to_record:json_boolean',
|
||||
'FeatureCloud' => 'feature_cloud:json_boolean',
|
||||
'AttendingMedia' => 'attending_media:json_boolean',
|
||||
'StatusNice' => 'status:json_string',
|
||||
];
|
||||
|
||||
|
@ -37,7 +37,7 @@ class PresentationSerializer extends SummitEventSerializer
|
|||
'problem_addressed',
|
||||
'attendees_expected_learnt',
|
||||
'to_record',
|
||||
'feature_cloud',
|
||||
'attending_media',
|
||||
'status',
|
||||
];
|
||||
|
||||
|
|
|
@ -104,10 +104,10 @@ class Presentation extends SummitEvent
|
|||
protected $to_record;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="FeatureCloud", type="boolean")
|
||||
* @ORM\Column(name="AttendingMedia", type="boolean")
|
||||
* @var bool
|
||||
*/
|
||||
protected $feature_cloud;
|
||||
protected $attending_media;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="PresentationSpeaker", inversedBy="moderated_presentations")
|
||||
|
@ -169,10 +169,11 @@ class Presentation extends SummitEvent
|
|||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->materials = new ArrayCollection();
|
||||
$this->speakers = new ArrayCollection();
|
||||
$this->to_record = false;
|
||||
$this->feature_cloud = false;
|
||||
|
||||
$this->materials = new ArrayCollection();
|
||||
$this->speakers = new ArrayCollection();
|
||||
$this->to_record = false;
|
||||
$this->attending_media = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -475,19 +476,19 @@ class Presentation extends SummitEvent
|
|||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @return bool
|
||||
*/
|
||||
public function getFeatureCloud()
|
||||
public function getAttendingMedia()
|
||||
{
|
||||
return $this->feature_cloud;
|
||||
return $this->attending_media;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $feature_cloud
|
||||
* @param bool $attending_media
|
||||
*/
|
||||
public function setFeatureCloud($feature_cloud)
|
||||
public function setAttendingMedia($attending_media)
|
||||
{
|
||||
$this->feature_cloud = $feature_cloud;
|
||||
$this->attending_media = $attending_media;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -803,11 +803,12 @@ final class SummitService extends AbstractService implements ISummitService
|
|||
// main data
|
||||
if(isset($data['attendees_expected_learnt']))
|
||||
$event->setAttendeesExpectedLearnt(html_entity_decode($data['attendees_expected_learnt']));
|
||||
|
||||
if(isset($data['level']))
|
||||
$event->setLevel($data['level']);
|
||||
|
||||
$event->setFeatureCloud(isset($data['feature_cloud'])?
|
||||
filter_var($data['feature_cloud'], FILTER_VALIDATE_BOOLEAN) : 0);
|
||||
$event->setAttendingMedia(isset($data['attending_media'])?
|
||||
filter_var($data['attending_media'], FILTER_VALIDATE_BOOLEAN) : 0);
|
||||
|
||||
// if we are creating the presentation from admin, then
|
||||
// we should mark it as received and complete
|
||||
|
|
Loading…
Reference in New Issue