/** * Create a PresentationVideo object for a presentation from a VideoPresentation * @param Presentation $p * @param VideoPresentation $v * @return PresentationVideo */ private function createLegacyVideoMaterial(Presentation $p, VideoPresentation $v) { return PresentationVideo::create(['PresentationID' => $p->ID, 'Name' => $v->Name, 'DisplayOnSite' => $v->DisplayOnSite, 'YouTubeID' => trim($v->YouTubeID), 'Featured' => $v->Featured, 'Created' => $v->LastEdited, 'LastEdited' => $v->LastEdited, 'DateUploaded' => $p->StartDate ?: $p->Summit()->SummitBeginDate]); }