44 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
48 $objDefinition = $DIC[
'objDefinition'];
49 $ilAccess = $DIC[
'ilAccess'];
54 $this->options = array();
55 $this->source_id = (
int) $a_attribs[
"source_id"];
59 $this->target_id = (
int) $a_attribs[
"target_id"];
65 $id = (
int) $a_attribs[
"id"];
69 if (!$tree->isInTree(
$id)) {
73 $action = self::getActionForString($a_attribs[
"action"]);
78 $perm_copy = $ilAccess->checkAccess(
'copy',
'',
$id);
79 $copy = $objDefinition->allowCopy($type);
81 if ($perm_copy && $copy) {
82 $this->options [
$id] = array(
"type" => $action);
83 } elseif ($copy && !$perm_copy) {
90 $perm_link = $ilAccess->checkAccess(
'write',
'',
$id);
91 $link = $objDefinition->allowLink($type);
93 if ($perm_link && $link) {
94 $this->options [
$id] = array(
"type" => $action);
95 } 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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setHandlers($a_xml_parser)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
setXMLContent(string $a_xml_content)