ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilECSFileSettings.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once 'Services/WebServices/ECS/classes/class.ilECSObjectSettings.php';
6 
16 {
17  protected function getECSObjectType()
18  {
19  return '/campusconnect/files';
20  }
21 
22  protected function buildJson(ilECSSetting $a_server)
23  {
24  $json = $this->getJsonCore('application/ecs-file');
25  $json->version = $this->content_obj->getVersion();
26 
27  require_once("./Services/History/classes/class.ilHistory.php");
28  $entries = ilHistory::_getEntriesForObject($this->content_obj->getId(),
29  $this->content_obj->getType());
30  if(count($entries))
31  {
32  $entry = array_shift($entries);
33  $entry = new ilDateTime($entry["date"],IL_CAL_DATETIME);
34 
35  $json->version_date = $entry->get(IL_CAL_UNIX);
36  }
37  else
38  {
39 
40  $json->version_date = time();
41  }
42 
43  return $json;
44  }
45 }
46 
47 ?>
Class ilECSFileSettings.
const IL_CAL_DATETIME
buildJson(ilECSSetting $a_server)
const IL_CAL_UNIX
Date and time handling
static _getEntriesForObject($a_obj_id, $a_obj_type="")
get all history entries for an object
getJsonCore($a_etype)
Build core json structure.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Handles object exports to ECS.