當前位置: 首頁>>代碼示例>>PHP>>正文


PHP record_adapter::getCollectionId方法代碼示例

本文整理匯總了PHP中record_adapter::getCollectionId方法的典型用法代碼示例。如果您正苦於以下問題:PHP record_adapter::getCollectionId方法的具體用法?PHP record_adapter::getCollectionId怎麽用?PHP record_adapter::getCollectionId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在record_adapter的用法示例。


在下文中一共展示了record_adapter::getCollectionId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mirror

 /**
  * @param record_adapter $record
  */
 private function mirror(record_adapter $record)
 {
     $this->mime = $record->getMimeType();
     $this->sha256 = $record->getSha256();
     $this->original_name = $record->getOriginalName();
     $this->type = $record->getType();
     $this->isStory = $record->isStory();
     $this->uuid = $record->getUuid();
     $this->updated = $record->getUpdated();
     $this->created = $record->getCreated();
     $this->base_id = $record->getBaseId();
     $this->collection_id = $record->getCollectionId();
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:16,代碼來源:adapter.php

示例2: listStory

 /**
  * Retrieve detailed information about one story
  *
  * @param Request         $request
  * @param \record_adapter $story
  * @return array
  * @throws \Exception
  */
 public function listStory(Request $request, \record_adapter $story)
 {
     if (!$story->isStory()) {
         return Result::createError($request, 404, 'Story not found')->createResponse();
     }
     $records = array_map(function (\record_adapter $record) use($request) {
         return $this->listRecord($request, $record);
     }, array_values($story->get_children()->get_elements()));
     $caption = $story->get_caption();
     $format = function (\caption_record $caption, $dcField) {
         $field = $caption->get_dc_field($dcField);
         if (!$field) {
             return null;
         }
         return $field->get_serialized_values();
     };
     return ['@entity@' => self::OBJECT_TYPE_STORY, 'databox_id' => $story->getDataboxId(), 'story_id' => $story->getRecordId(), 'updated_on' => $story->getUpdated()->format(DATE_ATOM), 'created_on' => $story->getCreated()->format(DATE_ATOM), 'collection_id' => $story->getCollectionId(), 'base_id' => $story->getBaseId(), 'thumbnail' => $this->listEmbeddableMedia($request, $story, $story->get_thumbnail()), 'uuid' => $story->getUuid(), 'metadatas' => ['@entity@' => self::OBJECT_TYPE_STORY_METADATA_BAG, 'dc:contributor' => $format($caption, \databox_Field_DCESAbstract::Contributor), 'dc:coverage' => $format($caption, \databox_Field_DCESAbstract::Coverage), 'dc:creator' => $format($caption, \databox_Field_DCESAbstract::Creator), 'dc:date' => $format($caption, \databox_Field_DCESAbstract::Date), 'dc:description' => $format($caption, \databox_Field_DCESAbstract::Description), 'dc:format' => $format($caption, \databox_Field_DCESAbstract::Format), 'dc:identifier' => $format($caption, \databox_Field_DCESAbstract::Identifier), 'dc:language' => $format($caption, \databox_Field_DCESAbstract::Language), 'dc:publisher' => $format($caption, \databox_Field_DCESAbstract::Publisher), 'dc:relation' => $format($caption, \databox_Field_DCESAbstract::Relation), 'dc:rights' => $format($caption, \databox_Field_DCESAbstract::Rights), 'dc:source' => $format($caption, \databox_Field_DCESAbstract::Source), 'dc:subject' => $format($caption, \databox_Field_DCESAbstract::Subject), 'dc:title' => $format($caption, \databox_Field_DCESAbstract::Title), 'dc:type' => $format($caption, \databox_Field_DCESAbstract::Type)], 'records' => $records];
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:26,代碼來源:V1Controller.php


注:本文中的record_adapter::getCollectionId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。