ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjRemoteGlossary.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once('Services/WebServices/ECS/classes/class.ilRemoteObjectBase.php');
5
16{
17 const DB_TABLE_NAME = "rglo_settings";
18
21
23
24 public function initType()
25 {
26 $this->type = "rglo";
27 }
28
29 protected function getTableName()
30 {
32 }
33
34 protected function getECSObjectType()
35 {
36 return "/campusconnect/glossaries";
37 }
38
45 {
46 $this->availability_type = $a_type;
47 }
48
54 public function getAvailabilityType()
55 {
57 }
58
65 public static function _lookupOnline($a_obj_id)
66 {
67 global $ilDB;
68
69 $query = "SELECT * FROM ".self::DB_TABLE_NAME.
70 " WHERE obj_id = ".$ilDB->quote($a_obj_id ,'integer')." ";
71 $res = $ilDB->query($query);
73 switch($row->availability_type)
74 {
76 return true;
77
79 return false;
80
81 default:
82 return false;
83 }
84
85 return false;
86 }
87
88 protected function doCreateCustomFields(array &$a_fields)
89 {
90 $a_fields["availability_type"] = array("integer", 0);
91 }
92
93 protected function doUpdateCustomFields(array &$a_fields)
94 {
95 $a_fields["availability_type"] = array("integer", $this->getAvailabilityType());
96 }
97
98 protected function doReadCustomFields($a_row)
99 {
100 $this->setAvailabilityType($a_row->availability_type);
101 }
102
103 protected function updateCustomFromECSContent(ilECSSetting $a_server, $a_ecs_content)
104 {
105 $this->setAvailabilityType($a_ecs_content->availability == 'online' ? self::ACTIVATION_ONLINE : self::ACTIVATION_OFFLINE);
106 }
107
108}
109
110?>
An exception for terminatinating execution or to throw for unit testing.
Remote glossary app class.
getECSObjectType()
Get ECS resource identifier, e.g.
doReadCustomFields($a_row)
Read custom fields from db row.
getTableName()
Get db table name.
getAvailabilityType()
get availability type
doCreateCustomFields(array &$a_fields)
Add custom fields to db insert.
doUpdateCustomFields(array &$a_fields)
Add custom fields to db update.
updateCustomFromECSContent(ilECSSetting $a_server, $a_ecs_content)
update remote object settings from ecs content
setAvailabilityType($a_type)
Set Availability type.
static _lookupOnline($a_obj_id)
Lookup online.
Remote object app base class.
global $ilDB
$a_type
Definition: workflow.php:93