3 declare(strict_types=1);
47 $tax->setMetaId($a_taxon_id);
56 $tax->setParentType(
'meta_taxon_path');
64 $this->source = $a_source;
74 $this->source_language = $lng_obj;
79 return is_object($this->source_language) ? $this->source_language : null;
84 return is_object($this->source_language) ? $this->source_language->getLanguageCode() :
'';
90 $fields[
'meta_taxon_path_id'] = array(
'integer', $next_id = $this->db->nextId(
'il_meta_taxon_path'));
92 if ($this->db->insert(
'il_meta_taxon_path', $fields)) {
101 return $this->
getMetaId() && $this->db->update(
102 'il_meta_taxon_path',
104 array(
"meta_taxon_path_id" => array(
'integer', $this->
getMetaId()))
108 public function delete():
bool 111 $query =
"DELETE FROM il_meta_taxon_path " .
112 "WHERE meta_taxon_path_id = " . $this->db->quote($this->
getMetaId(),
'integer');
131 'rbac_id' => array(
'integer', $this->
getRBACId()),
132 'obj_id' => array(
'integer', $this->
getObjId()),
133 'obj_type' => array(
'text', $this->
getObjType()),
135 'parent_id' => array(
'integer', $this->
getParentId()),
136 'source' => array(
'text', $this->
getSource()),
144 $query =
"SELECT * FROM il_meta_taxon_path " .
145 "WHERE meta_taxon_path_id = " . $this->db->quote($this->
getMetaId(),
'integer');
150 $this->
setObjId((
int) $row->obj_id);
175 foreach ($taxs as
$id) {
177 $tax->toXML($writer);
181 $tax->toXML($writer);
190 public static function _getIds(
int $a_rbac_id,
int $a_obj_id,
int $a_parent_id,
string $a_parent_type): array
194 $ilDB = $DIC->database();
196 $query =
"SELECT meta_taxon_path_id FROM il_meta_taxon_path " .
197 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
198 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
199 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
200 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text');
205 $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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlEndTag(string $tag)
Writes an endtag.
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)