19declare(strict_types=1);
44 public function __construct(
string $a_target,
int $a_sid,
int $a_mid)
53 $this->
setRoot($this->tree->readRootId());
95 $this->form_items[
$type] =
true;
100 $this->form_items[
$type] =
false;
105 $this->checked_items = $a_checked_items;
115 return in_array($a_id, $this->checked_items,
true);
120 $this->post_var = $a_post_var;
129 if (!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type]) {
133 switch ($this->type) {
145 "document.getElementById('map').submit(); return false;"
157 if (!isset($a_node_id) || !is_array($a_option)) {
158 $this->
error->raiseError(get_class($this) .
"::formatObject(): Missing parameter or wrong datatype! " .
159 "node_id: " . $a_node_id .
" options:" . print_r($a_option,
true), $this->
error->WARNING);
163 foreach ($a_option[
"tab"] as $picture) {
164 if ($picture ===
'plus') {
176 if ($picture ===
'minus' && $this->show_minus) {
195 if ($this->output_icons) {
197 $tpl->
setVariable(
"ICON_IMAGE", $this->
getImage(
"standard/icon_" . $a_option[
"type"] .
".svg", $a_option[
"type"], $a_obj_id));
200 $this->iconList[] =
"iconid_" . $a_node_id;
205 if (($formItem = $this->
buildFormItem((
int) $a_node_id, (
string) $a_option[
'type'])) !==
'') {
211 if ($this->
isClickable($a_option[
"type"], (
int) $a_node_id)) {
220 if ($style_class !==
"") {
224 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !==
"") {
231 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
236 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]),
249 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
289 if (($formItem = $this->
buildFormItem((
int) $a_obj_id, (
string) $a_option[
'type'])) !==
'') {
298 '<font style="font-weight: bold">' .
$title .
'</font>'
308 public function buildTitle(
string $a_title, $a_id,
string $a_type): string
311 return '<font style="font-weight: bold">' . $a_title .
'</font>';
314 return '<font style="font-style: italic">' . $a_title .
'</font>';
337 return array_key_exists($a_ref_id, $this->mappings);
342 foreach ($this->mappings as $parent_nodes) {
343 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)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
touchBlock(string $block)
overwrites ITX::touchBlock.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)