19 declare(strict_types=1);
35 $this->or_composite_id = $a_or_composite_id;
40 if (!$this->or_composite_id) {
41 $query =
"SELECT MAX(or_composite_id) orc FROM il_meta_requirement " .
42 "WHERE rbac_id = " . $this->db->quote($this->
getRBACId(),
'integer') .
" " .
43 "AND obj_id = " . $this->db->quote($this->
getObjId(),
'integer') .
" ";
45 $res = $this->db->query($query);
47 $this->or_composite_id = (
int) $row->orc;
70 if (!$a_requirement_id) {
74 $req->setMetaId($a_requirement_id);
83 $req->setParentType(
'meta_technical');
91 echo
'Use ilMDOrcomposite::addRequirement()';
95 public function delete():
bool 110 foreach ($reqs as
$id) {
112 $req->toXML($writer);
116 $req->toXML($writer);
130 string $a_parent_type,
131 int $a_or_composite_id = 0
135 $ilDB = $DIC->database();
137 $query =
"SELECT DISTINCT(or_composite_id) or_composite_id FROM il_meta_requirement " .
138 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
139 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
140 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
141 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text') .
" " .
142 "AND or_composite_id > 0 ";
147 $ids[] = (
int) $row->or_composite_id;
toXML(ilXmlWriter $writer)
setOrCompositeId(int $a_or_composite_id)
catch(\Exception $e) $req
xmlEndTag(string $tag)
Writes an endtag.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type, int $a_or_composite_id=0)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getRequirement(int $a_requirement_id)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type, int $a_or_composite_id=0)