当前位置: 首页>>代码示例>>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;未经允许,请勿转载。