コード例 #1
0
 /**
  * Builds the indexed data for first indexation
  *
  * @param Docman_Item    $item
  * @param Docman_Version $version
  *
  * @return array
  */
 public function getIndexedDataForItemVersion(Docman_Item $item)
 {
     $hardcoded_metadata = array('id' => $item->getId(), 'group_id' => $item->getGroupId(), 'title' => $item->getTitle(), 'description' => $item->getDescription(), 'create_date' => date('c', $item->getCreateDate()), 'update_date' => date('c', $item->getUpdateDate()), 'permissions' => $this->permissions_manager->exportPermissions($item), 'approval_table_comments' => $this->getDocumentApprovalTableComments($item), 'owner' => $item->getOwnerId());
     if ($item->getObsolescenceDate()) {
         $hardcoded_metadata['obsolescence_date'] = date('c', $item->getObsolescenceDate());
     }
     return $hardcoded_metadata;
 }