ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
5include_once 'Services/WebServices/ECS/classes/class.ilECSObjectSettings.php';
6
16{
17 protected function getECSObjectType()
18 {
19 return '/campusconnect/files';
20 }
21
22
23 protected function buildJson(ilECSSetting $a_server)
24 {
25 $json = $this->getJsonCore('application/ecs-file');
26 $json->version = $this->content_obj->getVersion();
27
28 require_once("./Services/History/classes/class.ilHistory.php");
30 $this->content_obj->getId(),
31 $this->content_obj->getType()
32 );
33 if (count($entries)) {
34 $entry = array_shift($entries);
35 $entry = new ilDateTime($entry["date"], IL_CAL_DATETIME);
36
37 $json->version_date = $entry->get(IL_CAL_UNIX);
38 } else {
39 $json->version_date = time();
40 }
41
42 return $json;
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
Class ilECSFileSettings.
buildJson(ilECSSetting $a_server)
Build resource-specific json.
getECSObjectType()
Get ECS resource identifier, e.g.
Handles object exports to ECS.
getJsonCore($a_etype)
Build core json structure.
static _getEntriesForObject($a_obj_id, $a_obj_type="")
get all history entries for an object