19declare(strict_types=1);
46 $this->
setId(
"cont_paste_explorer");
51 $this->root_id = $this->tree->readRootId();
52 $this->order_column =
'title';
71 $this->clipboard =
$DIC
87 $this->form_items[$type] =
true;
92 $this->form_items[$type] =
false;
97 $this->checked_items = $checked_items;
102 return in_array(
$id, $this->checked_items);
107 $this->post_var = $post_var;
112 return $this->post_var;
117 $this->form_item_permission = $form_item_permission;
122 return $this->form_item_permission;
127 if (!$this->
access->checkAccess($this->getRequiredFormItemPermission(),
'', $node_id)) {
132 !array_key_exists($type, $this->form_items) ||
133 !$this->form_items[$type]
139 if ($this->clipboard->hasEntries()) {
140 $disabled = in_array($node_id, $this->clipboard->getRefIds());
141 } elseif ($this->clipboard->getCmd() ==
'copy' && $node_id == $this->clipboard->getParent()) {
145 switch ($this->type) {
146 case self::SEL_TYPE_CHECK:
148 $this->isItemChecked($node_id),
153 case self::SEL_TYPE_RADIO:
155 $this->isItemChecked($node_id),
167 $node_id = (
int) $node_id;
168 $obj_id = (
int) $obj_id;
169 if (!isset($node_id) or !is_array($option)) {
170 $this->
error->raiseError(
172 "::formatObject(): Missing parameter or wrong datatype! " .
177 $this->
error->WARNING
182 foreach ($option[
"tab"] as $picture) {
183 if ($picture ==
'plus') {
186 $target = $this->createTarget(
'+', $node_id);
188 $tpl->
setVariable(
"LINK_TARGET_EXPANDER", $target);
189 $tpl->
setVariable(
"IMGPATH", $this->getImage(
"browser/plus.png"));
194 if ($picture ==
'minus' && $this->show_minus) {
197 $target = $this->createTarget(
'-', $node_id);
199 $tpl->
setVariable(
"LINK_TARGET_EXPANDER", $target);
200 $tpl->
setVariable(
"IMGPATH", $this->getImage(
"browser/minus.png"));
208 $tpl->
setVariable(
"BLANK_PATH", $this->getImage(
"browser/blank.png"));
212 if ($this->output_icons) {
218 $tpl->
setVariable(
"TARGET_ID",
"iconid_" . $node_id);
219 $this->iconList[] =
"iconid_" . $node_id;
220 $tpl->
setVariable(
"TXT_ALT_IMG", $this->
lng->txt($option[
"desc"]));
224 if (strlen($formItem = $this->buildFormItem($node_id, $option[
'type']))) {
230 if ($this->isClickable($option[
"type"], $node_id)) {
232 $tpl->
setVariable(
"LINK_TARGET", $this->buildLinkTarget($node_id, $option[
"type"]));
234 $style_class = $this->getNodeStyleClass($node_id, $option[
"type"]);
236 if ($style_class !=
"") {
237 $tpl->
setVariable(
"A_CLASS",
' class="' . $style_class .
'" ');
240 if (($onclick = $this->buildOnClick($node_id, $option[
"type"], $option[
"title"])) !=
"") {
241 $tpl->
setVariable(
"ONCLICK",
"onClick=\"$onclick\"");
245 $tpl->
setVariable(
"TITLE", $this->buildTitle($option[
"title"], $node_id, $option[
"type"]));
249 $this->buildDescription($option[
"description"], $node_id, $option[
"type"]),
254 $frame_target = $this->buildFrameTarget($option[
"type"], $node_id, $option[
"obj_id"]);
255 if ($frame_target !=
"") {
256 $tpl->
setVariable(
"TARGET",
" target=\"" . $frame_target .
"\"");
259 $obj_title = $this->buildTitle($option[
"title"], $node_id, $option[
"type"]);
261 if ($node_id == $this->highlighted) {
262 $obj_title =
"<span class=\"ilHighlighted\">" . $obj_title .
"</span>";
270 $this->buildDescription($option[
"desc"], $node_id, $option[
"type"]),
292 $title =
$nd[
"title"];
293 if ($title ==
"ILIAS") {
294 $title = $this->
lng->txt(
"repository");
301 if (strlen($formItem = $this->buildFormItem((
int) $obj_id, $option[
'type']))) {
312 if ($parent_id == 0) {
315 if ($this->
access->checkAccess(
"read",
"", (
int) $parent_id)) {
323 if (!$this->
access->checkAccess(
'visible',
'', (
int)
$ref_id)) {
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setVariable($variable, $value='')
Sets a variable value.
Manages items in repository clipboard.
const IL_FM_POSITIVE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addFilter(string $a_item)
setFilterMode(int $a_mode=IL_FM_NEGATIVE)
setSessionExpandVariable(string $a_var_name="expand")
setFiltered(bool $a_bool)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
ilPasteIntoMultipleItemsExplorer Explorer
ClipboardManager $clipboard
setPostVar(string $post_var)
__construct(int $type, string $target, string $session_variable)
setCheckedItems(array $checked_items=[])
buildFormItem(int $node_id, string $type)
removeFormItemForType(string $type)
formatHeader(ilTemplate $tpl, $obj_id, array $option)
addFormItemForType(string $type)
isClickable(string $type, int $ref_id=0)
showChilds($parent_id, $obj_id=0)
setRequiredFormItemPermission(string $form_item_permission)
isVisible($ref_id, string $type)
string $form_item_permission
formatObject(ilTemplate $tpl, $node_id, array $option, $obj_id=0)
getRequiredFormItemPermission()
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc