Skip to content
Snippets Groups Projects
Commit 81190f45 authored by efalcy's avatar efalcy
Browse files

dev #75244 : fix test and refacto les yeux doc

parent f9037a79
Branches
Tags
3 merge requests!2684Master,!2681Dev#75244 connecteur les yeux du doc les yeux du doc,!2666Dev#75244 connecteur les yeux du doc les yeux du doc
Pipeline #4220 failed with stage
in 34 minutes and 45 seconds
......@@ -40,19 +40,23 @@ class Class_WebService_BibNumerique_ArteVOD_Film extends Class_WebService_BibNu
->setDescription($json['description'])
->addPoster($json['posterUrl'])
->setDirectors($json['directors'])
->setGenres(isset($json['genres']) ? $json['genres'] : [])
->addTrailer(isset($json['trailerUrl']) ? $json('trailerUrl') : '')
->setExternalUri($json['url'])
->addMedias(isset($json['medias']) ? $json['medias'] : [])
->addThemes($json['themes'])
->setYear(isset($json['productionYear']) ?
$json['productionYear'] :
(isset($json['publicationDate']) ?
explode('-', $json['publicationDate'])[0]
:''))
->addActors(isset($json['actors']) ?
$json['actors'] : [])
->addDuration($json['duration']);
->addDuration($json['duration'])
->addMedias(isset($json['medias']) ? $json['medias'] : [])
->addThemes($json['themes'])
;
if (isset($json['genres']))
$this->setGenres($json['genres']);
if (isset($json['trailerUrl']))
$this->addTrailer($json['trailerUrl'] );
if (isset($json['productionYear']))
$this->setYear($json['productionYear']);
if (isset($json['publicationDate']))
$this->setYear(explode('-', $json['publicationDate'])[0]);
}
......@@ -92,11 +96,15 @@ class Class_WebService_BibNumerique_ArteVOD_Film extends Class_WebService_BibNu
return $this;
}
protected function setTypeDoc($album) {
return $album->beArteVOD();
}
public function fillAlbum($album) {
$album->beArteVOD()
->setDuration($this->duration.' mn')
->setTags($this->getTags());
$this->setTypeDoc($album)
->setDuration($this->duration.' mn')
->setTags($this->getTags());
foreach ($this->getActors() as $actor)
$album->addAuthor(trim($actor['familyName'] . ' ' . $actor['givenName']),
......
......@@ -21,18 +21,9 @@
class LesYeuxDoc_Service_Film extends Class_WebService_BibNumerique_ArteVOD_Film {
public function fillAlbum($album) {
$album->setTypeDocId(LesYeuxDoc_Config::getInstance()->getDocType());
$album->setDuration($this->duration.' mn')
->setTags($this->getTags());
foreach ($this->getActors() as $actor)
$album->addAuthor(trim($actor['familyName'] . ' ' . $actor['givenName']),
'005');
foreach ($this->_directors as $director)
$album->addAuthor(trim($director['familyName'] . ' ' . $director['givenName']),
'300');
protected function setTypeDoc($album) {
$album->setTypeDocId(LesYeuxDoc_Config::getInstance()->getDocType());
return $album;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment