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

Public Member Functions

 setFormat ($a_format)
 
 getFormat ()
 
 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)
 

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 34 of file class.ilMD5295Format.php.

Member Function Documentation

◆ __getFields()

ilMD5295Format::__getFields ( )

Definition at line 97 of file class.ilMD5295Format.php.

98 {
99 return array('rbac_id' => array('integer',$this->getRBACId()),
100 'obj_id' => array('integer',$this->getObjId()),
101 'obj_type' => array('text',$this->getObjType()),
102 'format' => array('text',$this->getFormat()));
103 }

References getFormat(), ilMD5295Base\getObjId(), ilMD5295Base\getObjType(), and ilMD5295Base\getRBACId().

Referenced by save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getIds()

static ilMD5295Format::_getIds (   $a_rbac_id,
  $a_obj_id 
)
static

Definition at line 142 of file class.ilMD5295Format.php.

143 {
144 global $DIC;
145
146 $ilDB = $DIC['ilDB'];
147
148 $query = "SELECT meta_format_id FROM il_meta_format " .
149 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id, 'integer') . " " .
150 "AND obj_id = " . $ilDB->quote($a_obj_id, 'integer');
151
152 $res = $ilDB->query($query);
153 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
154 $ids[] = $row->meta_format_id;
155 }
156 return $ids ? $ids : array();
157 }
global $DIC
Definition: goto.php:24
$query
foreach($_POST as $key=> $value) $res
global $ilDB

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

Referenced by ilMD5295Technical\getFormatIds().

+ Here is the caller graph for this function:

◆ delete()

ilMD5295Format::delete ( )

Reimplemented from ilMD5295Base.

Definition at line 80 of file class.ilMD5295Format.php.

81 {
82 global $DIC;
83
84 $ilDB = $DIC['ilDB'];
85
86 if ($this->getMetaId()) {
87 $query = "DELETE FROM il_meta_format " .
88 "WHERE meta_format_id = " . $ilDB->quote($this->getMetaId(), 'integer');
89 $res = $ilDB->manipulate($query);
90
91 return true;
92 }
93 return false;
94 }

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

+ Here is the call graph for this function:

◆ getFormat()

ilMD5295Format::getFormat ( )

Definition at line 41 of file class.ilMD5295Format.php.

42 {
43 return $this->format;
44 }
$format
Definition: metadata.php:218

References $format.

Referenced by __getFields(), and toXML().

+ Here is the caller graph for this function:

◆ read()

ilMD5295Format::read ( )

Definition at line 105 of file class.ilMD5295Format.php.

106 {
107 global $DIC;
108
109 $ilDB = $DIC['ilDB'];
110
111 include_once 'Services/Migration/DBUpdate_5295/classes/class.ilMD5295LanguageItem.php';
112
113 if ($this->getMetaId()) {
114 $query = "SELECT * FROM il_meta_format " .
115 "WHERE meta_format_id = " . $ilDB->quote($this->getMetaId(), 'integer');
116
117 $res = $this->db->query($query);
118 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
119 $this->setRBACId($row->rbac_id);
120 $this->setObjId($row->obj_id);
121 $this->setObjType($row->obj_type);
122 $this->setFormat($row->format);
123 }
124 }
125 return true;
126 }

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilMD5295Base\getMetaId(), setFormat(), ilMD5295Base\setObjId(), ilMD5295Base\setObjType(), and ilMD5295Base\setRBACId().

+ Here is the call graph for this function:

◆ save()

ilMD5295Format::save ( )

Reimplemented from ilMD5295Base.

Definition at line 46 of file class.ilMD5295Format.php.

47 {
48 global $DIC;
49
50 $ilDB = $DIC['ilDB'];
51
52 $fields = $this->__getFields();
53 $fields['meta_format_id'] = array('integer',$next_id = $ilDB->nextId('il_meta_format'));
54
55 if ($this->db->insert('il_meta_format', $fields)) {
56 $this->setMetaId($next_id);
57 return $this->getMetaId();
58 }
59 return false;
60 }
setMetaId($a_meta_id, $a_read_data=true)

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

+ Here is the call graph for this function:

◆ setFormat()

ilMD5295Format::setFormat (   $a_format)

Definition at line 37 of file class.ilMD5295Format.php.

38 {
39 $this->format = $a_format;
40 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toXML()

ilMD5295Format::toXML ( $writer)

Reimplemented from ilMD5295Base.

Definition at line 133 of file class.ilMD5295Format.php.

134 {
135 if ($this->getFormat()) {
136 $writer->xmlElement('Format', null, $this->getFormat());
137 }
138 }

References getFormat().

+ Here is the call graph for this function:

◆ update()

ilMD5295Format::update ( )

Reimplemented from ilMD5295Base.

Definition at line 62 of file class.ilMD5295Format.php.

63 {
64 global $DIC;
65
66 $ilDB = $DIC['ilDB'];
67
68 if ($this->getMetaId()) {
69 if ($this->db->update(
70 'il_meta_format',
71 $this->__getFields(),
72 array("meta_format_id" => array('integer',$this->getMetaId()))
73 )) {
74 return true;
75 }
76 }
77 return false;
78 }

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

+ Here is the call graph for this function:

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