server/src/app/Models/Document.php
changeset 128 bc18286e55b2
parent 125 e550b10fe3ca
child 130 fac22d8c2df8
equal deleted inserted replaced
127:5cd8c3065c38 128:bc18286e55b2
   352             $contributors = array_map(
   352             $contributors = array_map(
   353                 function($c) { unset($c['nameLiteral']); return $c; },
   353                 function($c) { unset($c['nameLiteral']); return $c; },
   354                 $this->getContributors()
   354                 $this->getContributors()
   355             );
   355             );
   356 
   356 
   357             return [
   357             $res = [
   358                 'id' => $this->getId(),
   358                 'id' => $this->getId(),
   359                 'uri' => $this->getUri(),
   359                 'uri' => $this->getUri(),
   360                 'title' => $this->getTitleValue(),
   360                 'title' => $this->getTitleValue(),
   361                 'language' => $this->getLanguageValue(),
   361                 'language' => $this->getLanguageValue(),
   362                 'language_resolved' => $this->getLanguageResolved(),
       
   363                 'modified' => $this->getModifiedValue(),
   362                 'modified' => $this->getModifiedValue(),
   364                 'publishers' => $publishers,
   363                 'publishers' => $publishers,
   365                 'contributors' => $contributors,
   364                 'contributors' => $contributors,
   366                 'mediaArray'=> $mediaArray
   365                 'mediaArray'=> $mediaArray
   367             ];
   366             ];
       
   367 
       
   368             if($this->language_resolved) {
       
   369                 $res['language_resolved'] = $this->getLanguageResolved();
       
   370             }
       
   371 
       
   372             return $res;
   368         }
   373         }
   369     }
   374     }
   370 
   375 
   371 }
   376 }