19 declare(strict_types=1);
51 $tax->setMetaId($a_taxon_id);
60 $tax->setParentType(
'meta_taxon_path');
68 $this->source = $a_source;
78 $this->source_language = $lng_obj;
83 return is_object($this->source_language) ? $this->source_language :
null;
88 return is_object($this->source_language) ? $this->source_language->getLanguageCode() :
'';
94 $fields[
'meta_taxon_path_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_taxon_path'));
96 if ($this->db->insert(
'il_meta_taxon_path', $fields)) {
105 return $this->
getMetaId() && $this->db->update(
106 'il_meta_taxon_path',
108 array(
"meta_taxon_path_id" => array(
'integer', $this->
getMetaId()))
112 public function delete():
bool 115 $query =
"DELETE FROM il_meta_taxon_path " .
116 "WHERE meta_taxon_path_id = " . $this->db->quote($this->
getMetaId(),
'integer');
117 $res = $this->db->manipulate($query);
135 'rbac_id' => array(
'integer', $this->
getRBACId()),
136 'obj_id' => array(
'integer', $this->
getObjId()),
137 'obj_type' => array(
'text', $this->
getObjType()),
139 'parent_id' => array(
'integer', $this->
getParentId()),
140 'source' => array(
'text', $this->
getSource()),
148 $query =
"SELECT * FROM il_meta_taxon_path " .
149 "WHERE meta_taxon_path_id = " . $this->db->quote($this->
getMetaId(),
'integer');
151 $res = $this->db->query($query);
154 $this->
setObjId((
int) $row->obj_id);
179 foreach ($taxs as
$id) {
181 $tax->toXML($writer);
185 $tax->toXML($writer);
194 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
198 $ilDB = $DIC->database();
200 $query =
"SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
201 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
202 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
203 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
204 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
209 $ids[] = (
int) $row->meta_taxon_path_id;
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
static _getIds(int $a_rbac_id, int $a_obj_id, int $a_parent_id, string $a_parent_type)
xmlEndTag(string $tag)
Writes an endtag.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilMDLanguageItem $source_language
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
setParentType(string $a_parent_type)
setSource(string $a_source)
setSourceLanguage(ilMDLanguageItem $lng_obj)
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
setMetaId(int $a_meta_id, bool $a_read_data=true)
getTaxon(int $a_taxon_id)
setObjType(string $a_type)
toXML(ilXmlWriter $writer)