ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMD5295Location Class Reference
+ Inheritance diagram for ilMD5295Location:
+ Collaboration diagram for ilMD5295Location:

Public Member Functions

 setLocation ($a_location)
 
 getLocation ()
 
 setLocationType ($a_location_type)
 
 getLocationType ()
 
 save ()
 
 update ()
 
 delete ()
 
 __getFields ()
 
 read ()
 
 toXML (&$writer)
 
- Public Member Functions inherited from ilMD5295Base
 __construct ( $a_rbac_id=0, $a_obj_id=0, $a_type=0)
 
 setRBACId ($a_id)
 
 getRBACId ()
 
 setObjId ($a_id)
 
 getObjId ()
 
 setObjType ($a_type)
 
 getObjType ()
 
 setMetaId ($a_meta_id, $a_read_data=true)
 
 getMetaId ()
 
 setParentType ($a_parent_type)
 
 getParentType ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setExportMode ($a_export_mode=true)
 
 getExportMode ()
 
 validate ()
 
 update ()
 
 save ()
 
 delete ()
 
 toXML (&$writer)
 

Static Public Member Functions

static _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 

Additional Inherited Members

- Data Fields inherited from ilMD5295Base
 $rbac_id
 
 $obj_id
 
 $obj_type
 
 $export_mode = false
 
- Protected Attributes inherited from ilMD5295Base
 $log
 

Detailed Description

Definition at line 33 of file class.ilMD5295Location.php.

Member Function Documentation

◆ __getFields()

ilMD5295Location::__getFields ( )

Definition at line 104 of file class.ilMD5295Location.php.

References getLocation(), getLocationType(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), ilMD5295Base\getParentId(), ilMD5295Base\getParentType(), and ilMD5295Base\getRBACId().

Referenced by save().

105  {
106  return array('rbac_id' => array('integer',$this->getRBACId()),
107  'obj_id' => array('integer',$this->getObjId()),
108  'obj_type' => array('text',$this->getObjType()),
109  'parent_type' => array('text',$this->getParentType()),
110  'parent_id' => array('integer',$this->getParentId()),
111  'location' => array('text',$this->getLocation()),
112  'location_type' => array('text',$this->getLocationType()));
113  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds()

static ilMD5295Location::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)
static

Definition at line 159 of file class.ilMD5295Location.php.

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMD5295Technical\getLocationIds().

160  {
161  global $DIC;
162 
163  $ilDB = $DIC['ilDB'];
164 
165  $query = "SELECT meta_location_id FROM il_meta_location " .
166  "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
167  "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer') . " " .
168  "AND parent_id = " . $ilDB->quote($a_parent_id, 'integer') . " " .
169  "AND parent_type = " . $ilDB->quote($a_parent_type, 'text');
170 
171  $res = $ilDB->query($query);
172  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
173  $ids[] = $row->meta_location_id;
174  }
175  return $ids ? $ids : array();
176  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the caller graph for this function:

◆ delete()

ilMD5295Location::delete ( )

Definition at line 87 of file class.ilMD5295Location.php.

References $DIC, $ilDB, $query, $res, and ilMD5295Base\getMetaId().

88  {
89  global $DIC;
90 
91  $ilDB = $DIC['ilDB'];
92 
93  if ($this->getMetaId()) {
94  $query = "DELETE FROM il_meta_location " .
95  "WHERE meta_location_id = " . $ilDB->quote($this->getMetaId(), 'integer');
96  $res = $ilDB->manipulate($query);
97 
98  return true;
99  }
100  return false;
101  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:

◆ getLocation()

ilMD5295Location::getLocation ( )

Definition at line 40 of file class.ilMD5295Location.php.

References $location.

Referenced by __getFields(), and toXML().

41  {
42  return $this->location;
43  }
$location
Definition: buildRTE.php:44
+ Here is the caller graph for this function:

◆ getLocationType()

ilMD5295Location::getLocationType ( )

Definition at line 48 of file class.ilMD5295Location.php.

Referenced by __getFields(), and toXML().

49  {
50  return $this->location_type;
51  }
+ Here is the caller graph for this function:

◆ read()

ilMD5295Location::read ( )

Definition at line 115 of file class.ilMD5295Location.php.

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setLocation(), setLocationType(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), ilMD5295Base\setParentId(), ilMD5295Base\setParentType(), and ilMD5295Base\setRBACId().

116  {
117  global $DIC;
118 
119  $ilDB = $DIC['ilDB'];
120 
121  include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295LanguageItem.php';
122 
123  if ($this->getMetaId()) {
124  $query = "SELECT * FROM il_meta_location " .
125  "WHERE meta_location_id = " . $ilDB->quote($this->getMetaId(), 'integer');
126 
127  $res = $this->db->query($query);
128  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
129  $this->setRBACId($row->rbac_id);
130  $this->setObjId($row->obj_id);
131  $this->setObjType($row->obj_type);
132  $this->setParentId($row->parent_id);
133  $this->setParentType($row->parent_type);
134  $this->setLocation($row->location);
135  $this->setLocationType($row->location_type);
136  }
137  }
138  return true;
139  }
setLocationType($a_location_type)
setParentType($a_parent_type)
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
+ Here is the call graph for this function:

◆ save()

ilMD5295Location::save ( )

Definition at line 53 of file class.ilMD5295Location.php.

References $DIC, $ilDB, __getFields(), ilMD5295Base\getMetaId(), and ilMD5295Base\setMetaId().

54  {
55  global $DIC;
56 
57  $ilDB = $DIC['ilDB'];
58 
59  $fields = $this->__getFields();
60  $fields['meta_location_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_location'));
61 
62  if ($this->db->insert('il_meta_location', $fields)) {
63  $this->setMetaId($next_id);
64  return $this->getMetaId();
65  }
66  return false;
67  }
global $DIC
Definition: goto.php:24
global $ilDB
setMetaId($a_meta_id, $a_read_data=true)
+ Here is the call graph for this function:

◆ setLocation()

ilMD5295Location::setLocation (   $a_location)

Definition at line 36 of file class.ilMD5295Location.php.

Referenced by read().

37  {
38  $this->location = $a_location;
39  }
+ Here is the caller graph for this function:

◆ setLocationType()

ilMD5295Location::setLocationType (   $a_location_type)

Definition at line 44 of file class.ilMD5295Location.php.

Referenced by read().

45  {
46  $this->location_type = $a_location_type;
47  }
+ Here is the caller graph for this function:

◆ toXML()

ilMD5295Location::toXML ( $writer)

Definition at line 146 of file class.ilMD5295Location.php.

References getLocation(), and getLocationType().

147  {
148  $writer->xmlElement(
149  'Location',
150  array('Type' => $this->getLocationType()
151  ? $this->getLocationType()
152  : 'LocalFile'),
153  $this->getLocation()
154  );
155  }
+ Here is the call graph for this function:

◆ update()

ilMD5295Location::update ( )

Definition at line 69 of file class.ilMD5295Location.php.

References $DIC, $ilDB, and ilMD5295Base\getMetaId().

70  {
71  global $DIC;
72 
73  $ilDB = $DIC['ilDB'];
74 
75  if ($this->getMetaId()) {
76  if ($this->db->update(
77  'il_meta_location',
78  $this->__getFields(),
79  array("meta_location_id" => array('integer',$this->getMetaId()))
80  )) {
81  return true;
82  }
83  }
84  return false;
85  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: