18declare(strict_types=1);
43 public function __construct(
string $a_target,
int $a_sid,
int $a_mid)
52 $this->
setRoot($this->tree->readRootId());
94 $this->form_items[
$type] =
true;
99 $this->form_items[
$type] =
false;
104 $this->checked_items = $a_checked_items;
114 return in_array($a_id, $this->checked_items,
true);
119 $this->post_var = $a_post_var;
128 if (!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type]) {
132 switch ($this->type) {
144 "document.getElementById('map').submit(); return false;"
156 if (!isset($a_node_id) || !is_array($a_option)) {
157 $this->
error->raiseError(get_class($this) .
"::formatObject(): Missing parameter or wrong datatype! " .
158 "node_id: " . $a_node_id .
" options:" . print_r($a_option,
true), $this->
error->WARNING);
162 foreach ($a_option[
"tab"] as $picture) {
163 if ($picture ===
'plus') {
175 if ($picture ===
'minus' && $this->show_minus) {
194 if ($this->output_icons) {
196 $tpl->
setVariable(
"ICON_IMAGE", $this->
getImage(
"icon_" . $a_option[
"type"] .
".svg", $a_option[
"type"], $a_obj_id));
199 $this->iconList[] =
"iconid_" . $a_node_id;
204 if (($formItem = $this->
buildFormItem((
int) $a_node_id, (
string) $a_option[
'type'])) !==
'') {
210 if ($this->
isClickable($a_option[
"type"], (
int) $a_node_id)) {
219 if ($style_class !==
"") {
223 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !==
"") {
230 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
235 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]),
248 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
288 if (($formItem = $this->
buildFormItem((
int) $a_obj_id, (
string) $a_option[
'type'])) !==
'') {
297 '<font style="font-weight: bold">' .
$title .
'</font>'
307 public function buildTitle(
string $a_title, $a_id,
string $a_type): string
310 return '<font style="font-weight: bold">' . $a_title .
'</font>';
313 return '<font style="font-style: italic">' . $a_title .
'</font>';
336 return array_key_exists($a_ref_id, $this->mappings);
341 foreach ($this->mappings as $parent_nodes) {
342 if (in_array($a_ref_id, $parent_nodes,
true)) {
setVariable($variable, $value='')
Sets a variable value.
const IL_FM_POSITIVE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getRuleRefIds(int $a_sid, int $a_mid)
buildFormItem($a_node_id, string $a_type)
setCheckedItems($a_checked_items=array())
removeFormItemForType($type)
hasParentMapping($a_ref_id)
isClickable(string $type, int $ref_id=0)
no item is clickable
formatHeader(ilTemplate $tpl, $a_obj_id, array $a_option)
overwritten method from base class
addFormItemForType($type)
Add form item.
initMappings()
Init (read) current mappings.
setPostVar(string $a_post_var)
__construct(string $a_target, int $a_sid, int $a_mid)
formatObject(ilTemplate $tpl, $a_node_id, array $a_option, $a_obj_id=0)
buildTitle(string $a_title, $a_id, string $a_type)
Format title (bold for direct mappings, italic for child mappings)
class for explorer view in admin frame
addFilter(string $a_item)
buildOnClick( $a_node_id, string $a_type, string $a_title)
setOrderColumn(string $a_column)
getNodeStyleClass( $a_id, string $a_type)
buildFrameTarget(string $a_type, $a_child=0, $a_obj_id=0)
setFilterMode(int $a_mode=IL_FM_NEGATIVE)
buildDescription(string $a_desc, $a_id, string $a_type)
getImage(string $a_name, string $a_type="", $a_obj_id="")
buildLinkTarget( $a_node_id, string $a_type)
setParamsGet(array $a_params_get)
createTarget(string $a_type, $a_node_id, bool $a_highlighted_subtree=false, bool $a_append_anch=true)
setFiltered(bool $a_bool)
ilGlobalTemplateInterface $tpl
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
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
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
overwrites ITX::touchBlock.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc