30 xml_set_object($a_xml_parser, $this);
31 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
32 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
38 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs) : void
42 $objDefinition = $DIC[
'objDefinition'];
43 $ilAccess = $DIC[
'ilAccess'];
48 $this->options = array();
49 $this->source_id = (
int) $a_attribs[
"source_id"];
53 $this->target_id = (
int) $a_attribs[
"target_id"];
59 $id = (
int) $a_attribs[
"id"];
63 if (!$tree->isInTree(
$id)) {
67 $action = self::getActionForString($a_attribs[
"action"]);
72 $perm_copy = $ilAccess->checkAccess(
'copy',
'',
$id);
73 $copy = $objDefinition->allowCopy(
$type);
75 if ($perm_copy && $copy) {
76 $this->options [
$id] = array(
"type" => $action);
77 } elseif ($copy && !$perm_copy) {
84 $perm_link = $ilAccess->checkAccess(
'write',
'',
$id);
85 $link = $objDefinition->allowLink(
$type);
87 if ($perm_link && $link) {
88 $this->options [
$id] = array(
"type" => $action);
89 } elseif ($link && !$perm_link) {
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
static getActionForString($s)
handlerCharacterData($a_xml_parser, string $a_data)
handlerEndTag($a_xml_parser, string $a_name)
SaxParserException thrown by ilSaxParser if property throwException is set.
static getTypeByRefId(int $ref_id, bool $stop_on_error=true)
get object type by reference id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _isInTrash(int $ref_id)
setHandlers($a_xml_parser)
__construct(Container $dic, ilPlugin $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setXMLContent(string $a_xml_content)