ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPasteStyleCharacteristicTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
30 protected string $from_style_type;
31 protected int $from_style_id;
34
35 public function __construct(
36 object $a_parent_obj,
37 string $a_parent_cmd,
39 ) {
40 global $DIC;
41
42 $this->ctrl = $DIC->ctrl();
43 $this->lng = $DIC->language();
44 $this->access = $DIC->access();
45 $ilCtrl = $DIC->ctrl();
46 $this->manager = $manager;
47 $lng = $DIC->language();
48
49 parent::__construct($a_parent_obj, $a_parent_cmd);
50 $this->setTitle($lng->txt("sty_paste_characteristics"));
51 $this->setLimit(9999);
52 $this->from_style_id = $this->manager->getCopyCharacteristicStyleId();
53 $this->from_style_type = $this->manager->getCopyCharacteristicStyleType();
54 $this->setData(array_map(function ($c) {
55 return ["char" => $c];
56 }, $this->manager->getCopyCharacteristics()));
57
58 $this->addColumn($this->lng->txt("name"));
59 $this->addColumn($this->lng->txt("type"));
60 $this->addColumn($this->lng->txt("sty_if_style_class_already_exists"));
61
62 $this->setEnableHeader(true);
63 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
64 $this->setRowTemplate("tpl.paste_style_row.html", "components/ILIAS/Style/Content");
65 $this->disable("footer");
66 $this->setEnableTitle(true);
67
68 //$this->addMultiCommand("", $lng->txt(""));
69 $this->addCommandButton("pasteCharacteristics", $lng->txt("paste"));
70 $this->addCommandButton("edit", $lng->txt("cancel"));
71 $this->addHiddenInput("from_style_id", (string) $this->from_style_id);
72 }
73
77 protected function fillRow(array $a_set): void
78 {
80
81 $char = explode(".", $a_set["char"]);
82 $this->tpl->setVariable("CHAR", $a_set["char"]);
83 $this->tpl->setVariable("SEL_OVERWRITE", 'checked="checked"');
84 $this->tpl->setVariable("VAL_TYPE", $lng->txt("sty_type_" . $char[0]));
85 $this->tpl->setVariable("VAL_TITLE", $char[2]);
86 $this->tpl->setVariable("TXT_OVERWRITE", $lng->txt("sty_overwrite"));
87 $this->tpl->setVariable("TXT_IGNORE", $lng->txt("sty_keep_existing"));
88 }
89}
Main business logic for characteristics.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
__construct(object $a_parent_obj, string $a_parent_cmd, Content\CharacteristicManager $manager)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setEnableTitle(bool $a_enabletitle)
addHiddenInput(string $a_name, string $a_value)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setEnableHeader(bool $a_enableheader)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
ilLanguage $lng
disable(string $a_module_name)
$c
Definition: deliver.php:25
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26