ILIAS  release_8 Revision v8.24
class.ilPCParagraphGUI.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Style;
20
27{
28 protected ilObjUser $user;
29
30 public function __construct(
31 ilPageObject $a_pg_obj,
32 ?ilPageContent $a_content_obj,
33 string $a_hier_id,
34 string $a_pc_id = ""
35 ) {
36 global $DIC;
37
38 $this->user = $DIC->user();
39 $this->ctrl = $DIC->ctrl();
40 $this->lng = $DIC->language();
41 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
42
43 // characteristics (should be flexible in the future)
45 }
46
50 public static function _getStandardCharacteristics(): array
51 {
52 global $DIC;
53
54 $lng = $DIC->language();
55
56 return array("Standard" => $lng->txt("cont_standard"),
57 "Headline1" => $lng->txt("cont_Headline1"),
58 "Headline2" => $lng->txt("cont_Headline2"),
59 "Headline3" => $lng->txt("cont_Headline3"),
60 "Book" => $lng->txt("cont_Book"),
61 "Numbers" => $lng->txt("cont_Numbers"),
62 "Verse" => $lng->txt("cont_Verse"),
63 "List" => $lng->txt("cont_List"),
64 "TableContent" => $lng->txt("cont_TableContent")
65 );
66 }
67
71 public static function _getStandardTextCharacteristics(): array
72 {
73 return ["Mnemonic", "Attention"];
74 }
75
79 public static function _getCharacteristics(int $a_style_id): array
80 {
81 global $DIC;
82 $request = $DIC->copage()->internal()
83 ->gui()
84 ->pc()
85 ->editRequest();
86 $requested_ref_id = $request->getRefId();
87
88 $service = $DIC->contentStyle()->internal();
89
92 if ($a_style_id > 0 &&
93 ilObject::_lookupType($a_style_id) == "sty") {
94 $access_manager = $service->domain()->access(
96 $DIC->user()->getId()
97 );
98 $char_manager = $service->domain()->characteristic(
99 $a_style_id,
100 $access_manager
101 );
102
103 $chars = $char_manager->getByTypes(
104 ["text_block", "heading1", "heading2", "heading3"],
105 false,
106 false
107 );
108 $new_chars = array();
109 foreach ($chars as $char) {
110 if (($st_chars[$char->getCharacteristic()] ?? "") != "") { // keep lang vars for standard chars
111 $title = $char_manager->getPresentationTitle(
112 $char->getType(),
113 $char->getCharacteristic()
114 );
115 if ($title == "") {
116 $title = $st_chars[$char->getCharacteristic()];
117 }
118 $new_chars[$char->getCharacteristic()] = $title;
119 } else {
120 $new_chars[$char->getCharacteristic()] = $char_manager->getPresentationTitle(
121 $char->getType(),
122 $char->getCharacteristic()
123 );
124 }
125 }
126 $chars = $new_chars;
127 }
128
129 return $chars;
130 }
131
135 public static function _getTextCharacteristics(
136 int $a_style_id,
137 bool $a_include_core = false
138 ): array {
139 global $DIC;
140
141 $chars = array();
142
143 $service = $DIC->contentStyle()->internal();
144 $request = $DIC->copage()->internal()
145 ->gui()
146 ->pc()
147 ->editRequest();
148 $requested_ref_id = $request->getRefId();
149
150 if ($a_style_id > 0 &&
151 ilObject::_lookupType($a_style_id) == "sty") {
152
153 $access_manager = $service->domain()->access(
155 $DIC->user()->getId()
156 );
157 $char_manager = $service->domain()->characteristic(
158 $a_style_id,
159 $access_manager
160 );
161
162 $style = new ilObjStyleSheet($a_style_id);
163 /*$ti_chars = $style->getCharacteristics("text_inline", false, $a_include_core);*/
164 $ti_chars = $char_manager->getByTypes(["text_inline", "code_inline"],
165 false,
166 false
167 );
169 foreach ($ti_chars as $k => $v) {
170 if (!$char_manager->isOutdated("text_inline", $v->getCharacteristic())) {
171 $chars[] = $v->getCharacteristic();
172 }
173 }
174 } else {
176 }
177
178 return $chars;
179 }
180
181
186 public function executeCommand()
187 {
188 // get next class that processes or forwards current command
189 $next_class = $this->ctrl->getNextClass($this);
190
191 $this->getCharacteristicsOfCurrentStyle(
192 array("text_block", "heading1", "heading2", "heading3")
193 ); // scorm-2004
194
195 // get current command
196 $cmd = $this->ctrl->getCmd();
197
198 $this->log->debug("ilPCParagraphGUI: executeCommand " . $cmd);
199
200 switch ($next_class) {
201 default:
202 $ret = $this->$cmd();
203 break;
204 }
205
206 return $ret;
207 }
208
209
213 public function determineCharacteristic(bool $a_insert = false): string
214 {
215 $cmd = $this->ctrl->getCmd();
216 // language and characteristic selection
217 if (!$a_insert) {
218 if ($cmd == "update") {
219 $s_char = $this->request->getString("par_characteristic");
220 } else {
221 $s_char = $this->content_obj->getCharacteristic();
222 if ($s_char == "") {
223 $s_char = "Standard";
224 }
225 }
226 } else {
227 if ($cmd == "create_par") {
228 $s_char = $this->request->getString("par_characteristic");
229 } else {
230 $s_char = "Standard";
231
232 // set characteristic of new paragraphs in list items to "List"
233 $cont_obj = $this->pg_obj->getContentObject($this->getHierId());
234 if (is_object($cont_obj)) {
235 if ($cont_obj->getType() == "li" ||
236 ($cont_obj->getType() == "par" && $cont_obj->getCharacteristic() == "List")) {
237 $s_char = "List";
238 }
239
240 if ($cont_obj->getType() == "td" ||
241 ($cont_obj->getType() == "par" && $cont_obj->getCharacteristic() == "TableContent")) {
242 $s_char = "TableContent";
243 }
244 }
245 }
246 }
247 return $s_char;
248 }
249
253 public function editJS(): void
254 {
255 $s_text = $this->content_obj->getText();
256 $this->log->debug("step 1: " . substr($s_text, 0, 1000));
257
258 //echo "\n<br><br>".htmlentities($s_text);
259 $s_text = $this->content_obj->xml2output($s_text, true, false);
260 $this->log->debug("step 2: " . substr($s_text, 0, 1000));
261
262 //echo "\n<br><br>".htmlentities($s_text);
263 $char = $this->determineCharacteristic(false);
264 $s_text = ilPCParagraphGUI::xml2outputJS($s_text);
265 $this->log->debug("step 3: " . substr($s_text, 0, 1000));
266
267 //echo "\n<br><br>".htmlentities($s_text);
268 $ids = "###" . $this->content_obj->readHierId() . ":" . $this->content_obj->readPCId() . "###" .
269 $char . "###";
270 echo $ids . $s_text;
271 $this->log->debug("step 4: " . substr($ids . $s_text, 0, 1000));
272 exit;
273 }
274
278 public function editMultipleJS(): void
279 {
280 echo $this->content_obj->getParagraphSequenceContent($this->pg_obj);
281 exit;
282 }
283
287 public static function xml2outputJS(string $s_text): string
288 {
289 // lists
290 $s_text = str_replace(
291 array("<SimpleBulletList>", "</SimpleBulletList>"),
292 array("<ul class='ilc_list_u_BulletedList'>", "</ul>"),
293 $s_text
294 );
295 $s_text = str_replace(
296 array("<SimpleNumberedList>", "</SimpleNumberedList>"),
297 array("<ol class='ilc_list_o_NumberedList'>", "</ol>"),
298 $s_text
299 );
300 $s_text = str_replace(
301 array("<SimpleListItem>", "</SimpleListItem>"),
302 array("<li class='ilc_list_item_StandardListItem'>", "</li>"),
303 $s_text
304 );
305 $s_text = str_replace(
306 array("<SimpleListItem/>"),
307 array("<li class='ilc_list_item_StandardListItem'></li>"),
308 $s_text
309 );
310
311 // spans
312 foreach (ilPageContentGUI::_getCommonBBButtons() as $bb => $cl) {
313 if (!in_array($bb, array("code", "tex", "fn", "xln", "sub", "sup"))) {
314 $s_text = str_replace(
315 "[" . $bb . "]",
316 '<span class="ilc_text_inline_' . $cl . '">',
317 $s_text
318 );
319 $s_text = str_replace(
320 "[/" . $bb . "]",
321 '</span>',
322 $s_text
323 );
324 }
325 }
326
327 // marked text spans
328 $ws = "[ \t\r\f\v\n]*";
329 while (preg_match("~\[(marked$ws(class$ws=$ws\"([^\"])*\")$ws)\]~i", $s_text, $found)) {
330 $attribs = ilPCParagraph::attribsToArray($found[2]);
331 if (isset($attribs["class"])) {
332 $s_text = str_replace("[" . $found[1] . "]", "<span class=\"ilc_text_inline_" . $attribs["class"] . "\">", $s_text);
333 } else {
334 $s_text = str_replace("[" . $found[1] . "]", "[error:marked" . $found[1] . "]", $s_text);
335 }
336 }
337 $s_text = preg_replace('~\[\/marked\]~i', "</span>", $s_text);
338
339
340 // code
341 $s_text = str_replace(
342 array("[code]", "[/code]"),
343 array("<code>", "</code>"),
344 $s_text
345 );
346
347 // sup
348 $s_text = str_replace(
349 array("[sup]", "[/sup]"),
350 array('<sup class="ilc_sup_Sup">', "</sup>"),
351 $s_text
352 );
353
354 // sub
355 $s_text = str_replace(
356 array("[sub]", "[/sub]"),
357 array('<sub class="ilc_sub_Sub">', "</sub>"),
358 $s_text
359 );
360
361 return $s_text;
362 }
363
367 public function outputError(array $a_err): void
368 {
369 $err_str = "";
370 foreach ($a_err as $err) {
371 $err_str .= $err[1] . "<br />";
372 }
373 echo $err_str;
374 $this->log->debug("ilPCParagraphGUI, outputError() and exit: " . substr($err_str, 0, 100));
375 exit;
376 }
377
378 public function cancel(): void
379 {
380 $this->log->debug("ilPCParagraphGUI, cancel(): return to parent: jump" . $this->hier_id);
381 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
382 }
383
388 ilTemplate $a_tpl,
389 string $a_seleted_value
390 ): void {
391 $i = 0;
392
393 $chars = $this->getCharacteristics();
394
395 if ($chars[$a_seleted_value] == "" && ($a_seleted_value != "")) {
396 $chars = array_merge(
397 array($a_seleted_value => $a_seleted_value),
398 $chars
399 );
400 }
401
402 foreach ($chars as $char => $char_lang) {
403 $a_tpl->setCurrentBlock("characteristic_cell");
404 $a_tpl->setVariable(
405 "CHAR_HTML",
406 '<div class="ilc_text_block_' . $char . '" style="margin-top:2px; margin-bottom:2px; position:static;">' . $char_lang . "</div>"
407 );
408 $a_tpl->setVariable("CHAR_VALUE", $char);
409 if ($char == $a_seleted_value) {
410 $a_tpl->setVariable(
411 "SELECTED",
412 ' checked="checked" '
413 );
414 }
415 $a_tpl->parseCurrentBlock();
416 if ((($i + 1) % 3) == 0) { //
417 $a_tpl->touchBlock("characteristic_row");
418 }
419 $i++;
420 }
421 $a_tpl->touchBlock("characteristic_table");
422 }
423
428 ilTemplate $a_tpl,
429 string $a_selected
430 ): void {
431 $a_tpl->setVariable("ADV_SEL_STYLE", self::getStyleSelector(
432 $a_selected,
433 $this->getCharacteristics()
434 ));
435 }
436
440 public static function getStyleSelector(
441 string $a_selected,
442 array $a_chars,
443 bool $a_use_callback = false
444 ): string {
445 $a_seleted = "";
446 $selection = new ilAdvancedSelectionListGUI();
447 $selection->setPullRight(false);
448 $selection->setFormSelectMode(
449 "par_characteristic",
450 "",
451 false,
452 "",
453 "",
454 "",
455 "",
456 "",
457 "",
458 ""
459 );
460 $selection->setId("style_selection");
461 $selection->setSelectionHeaderClass("ilEditSubmit ilTinyMenuDropDown");
462 $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
463 $selection->setSelectedValue($a_selected);
464 $selection->setUseImages(false);
466 if ($a_use_callback) {
467 $selection->setSelectCallback("ilCOPage.setParagraphClass");
468 }
469
470 $chars = $a_chars;
471 $title_char = ($chars[$a_selected] != "")
472 ? $chars[$a_selected]
473 : $a_selected;
474 $selection->setListTitle($title_char);
475
476 if ($chars[$a_seleted] == "" && ($a_seleted != "")) {
477 $chars = array_merge(
478 array($a_seleted => $a_seleted),
479 $chars
480 );
481 }
482
483 foreach ($chars as $char => $char_lang) {
484 $t = "text_block";
485 $tag = "div";
486 switch ($char) {
487 case "Headline1": $t = "heading1"; $tag = "h1"; break;
488 case "Headline2": $t = "heading2"; $tag = "h2"; break;
489 case "Headline3": $t = "heading3"; $tag = "h3"; break;
490 }
491 $html = '<div class="ilCOPgEditStyleSelectionItem"><' . $tag . ' class="ilc_' . $t . '_' . $char . '" style="' . self::$style_selector_reset . '">' . $char_lang . "</" . $tag . "></div>";
492 $selection->addItem(
493 $char_lang,
494 $char,
495 "",
496 "",
497 $char,
498 "",
499 $html
500 );
501 }
502 return $selection->getHTML();
503 }
504
508 public static function getCharStyleSelector(
509 string $a_par_type,
510 bool $a_use_callback = true,
511 int $a_style_id = 0
512 ): string {
513 global $DIC;
514
515 $lng = $DIC->language();
516
517 $selection = new ilAdvancedSelectionListGUI();
518 $selection->setPullRight(false);
519 $selection->setFormSelectMode(
520 "char_characteristic",
521 "",
522 false,
523 "",
524 "",
525 "",
526 "",
527 "",
528 "",
529 ""
530 );
531 $selection->setId("char_style_selection");
532 $selection->setSelectionHeaderClass("ilEditSubmit");
533 $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
534 //$selection->setSelectedValue($a_selected);
535 $selection->setUseImages(false);
536 $selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP);
537 $selection->setSelectCallback("ilCOPage.setCharacterClass");
538
539 //$chars = $a_chars;
540 //$title_char = ($chars[$a_selected] != "")
541 // ? $chars[$a_selected]
542 // : $a_selected;
543 $selection->setListTitle("&nbsp;<i>A</i>");
544
545 /*if ($chars[$a_seleted] == "" && ($a_seleted != ""))
546 {
547 $chars = array_merge(array($a_seleted => $a_seleted),
548 $chars);
549 }*/
550
551 $chars = array(
552 "Comment" => array("code" => "com", "txt" => $lng->txt("cont_char_style_com")),
553 "Quotation" => array("code" => "quot", "txt" => $lng->txt("cont_char_style_quot")),
554 "Accent" => array("code" => "acc", "txt" => $lng->txt("cont_char_style_acc")),
555 "Code" => array("code" => "code", "txt" => $lng->txt("cont_char_style_code"))
556 );
557
558 foreach (ilPCParagraphGUI::_getTextCharacteristics($a_style_id) as $c) {
559 if (!isset($chars[$c])) {
560 $chars[$c] = array("code" => "", "txt" => $c);
561 }
562 }
563
564 foreach ($chars as $key => $char) {
566 $a_par_type,
567 "active_" . $char["code"],
568 true
569 )) {
570 $t = "text_inline";
571 $tag = "span";
572 switch ($key) {
573 case "Code": $tag = "code"; break;
574 }
575 $html = '<' . $tag . ' class="ilc_' . $t . '_' . $key . '" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char["txt"] . "</" . $tag . ">";
576
577 // this next line is very important for IE. The real onclick event is on the surrounding <tr> of the
578 // advanced selection list. But it is impossible to prevent the tr-event from removing the focus
579 // on tiny withouth the following line, that receives the click event before and stops the faulty default
580 // bevaviour of IE, see bug report #8723
581 $html = '<a class="nostyle" style="display:block;" href="#" onclick="return false;">' . $html . "</a>";
582 $selection->addItem(
583 $char["txt"],
584 $key,
585 "",
586 "",
587 $key,
588 "",
589 $html
590 );
591 }
592 }
593 return $selection->getHTML();
594 }
595
596 private function setStyle(): void
597 {
598 if ($this->pg_obj->getParentType() == "gdf" ||
599 $this->pg_obj->getParentType() == "lm") {
600 if ($this->pg_obj->getParentType() != "gdf") {
601 $this->tpl->addCss(ilObjStyleSheet::getContentStylePath(
602 ilObjContentObject::_lookupStyleSheetId($this->pg_obj->getParentId())
603 ));
604 } else {
605 $this->tpl->addCss(ilObjStyleSheet::getContentStylePath(0));
606 }
607 }
608 }
609
613 public function insert(): string
614 {
615 $this->log->debug("ilPCParagraphGUI, saveJS: got updated value " . $this->updated);
616 return $this->edit(true);
617 }
618
622 public function update(): void
623 {
624 $this->log->debug("ilPCParagraphGUI, update(): start");
625
626 // set language and characteristic
627 $this->content_obj->setLanguage(
628 $this->request->getString("par_language")
629 );
630 $this->content_obj->setCharacteristic(
631 $this->request->getString("par_characteristic")
632 );
633
634 $this->updated = $this->content_obj->setText(
635 $this->content_obj->input2xml(
636 $this->request->getRaw("par_content"),
637 $this->request->getString("usedwsiwygeditor")
638 ),
639 true
640 );
641 if ($this->updated !== true) {
642 $this->edit();
643 return;
644 }
645
646 $this->updated = $this->content_obj->updatePage($this->pg_obj);
647
648
649 if ($this->updated === true) {
650 $this->log->debug("ilPCParagraphGUI, update(): return to parent: jump" . $this->hier_id);
651 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
652 } else {
653 $this->log->debug("ilPCParagraphGUI, update(): call edit.");
654 $this->edit();
655 }
656 }
657
661 public function create(): void
662 {
663 $this->log->debug("ilPCParagraphGUI, create(): start.");
664
665 if ($this->request->getString("ajaxform_hier_id") != "") {
666 $this->createJS();
667 return;
668 }
669
670 $this->content_obj = new ilPCParagraph($this->getPage());
671 //echo "+".$this->pc_id."+";
672 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
673
674 $this->content_obj->setLanguage(
675 $this->request->getString("par_language")
676 );
677 $this->setCurrentTextLang($this->request->getString("par_language"));
678 $this->content_obj->setCharacteristic(
679 $this->request->getString("par_characteristic")
680 );
681
682 $this->updated = $this->content_obj->setText(
683 $this->content_obj->input2xml(
684 $this->request->getRaw("par_content"),
685 $this->request->getString("usedwsiwygeditor")
686 ),
687 true
688 );
689
690 if ($this->updated !== true) {
691 $this->insert();
692 return;
693 }
694 $this->updated = $this->content_obj->updatePage($this->pg_obj);
695
696 if ($this->updated === true) {
697 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
698 } else {
699 $this->insert();
700 }
701 }
702
706 public function insertHelp(ilTemplate $a_tpl): void
707 {
709
710 $a_tpl->setCurrentBlock("help_item");
711 $a_tpl->setVariable("TXT_HELP", "<b>" . $lng->txt("cont_syntax_help") . "</b>");
712 $a_tpl->parseCurrentBlock();
713 $a_tpl->setCurrentBlock("help_item");
714 $a_tpl->setVariable("TXT_HELP", "* " . $lng->txt("cont_bullet_list"));
715 $a_tpl->parseCurrentBlock();
716 $a_tpl->setCurrentBlock("help_item");
717 $a_tpl->setVariable("TXT_HELP", "# " . $lng->txt("cont_numbered_list"));
718 $a_tpl->parseCurrentBlock();
719 $a_tpl->setCurrentBlock("help_item");
720 $a_tpl->setVariable("TXT_HELP", "=" . $lng->txt("cont_Headline1") . "=<br />" .
721 "==" . $lng->txt("cont_Headline2") . "==<br />" .
722 "===" . $lng->txt("cont_Headline3") . "===");
723 $a_tpl->parseCurrentBlock();
724
725 if ($this->getPageConfig()->getEnableWikiLinks()) {
726 $a_tpl->setCurrentBlock("help_item");
727 $a_tpl->setVariable("TXT_HELP", "[[" . $lng->txt("cont_wiki_page_link") . "]]");
728 $a_tpl->parseCurrentBlock();
729 }
730
731 $a_tpl->setCurrentBlock("help");
732 $a_tpl->parseCurrentBlock();
733 }
734}
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setVariable(string $a_group_name, string $a_var_name, string $a_var_value)
sets a variable in a group
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
static _lookupStyleSheetId(int $a_cont_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
User class.
static _lookupType(int $id, bool $reference=false)
Class ilPCParagraphGUI User Interface for Paragraph Editing.
static getCharStyleSelector(string $a_par_type, bool $a_use_callback=true, int $a_style_id=0)
Get character style selector.
insert()
insert paragraph form
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
outputError(array $a_err)
Output error.
insertCharacteristicTable(ilTemplate $a_tpl, string $a_seleted_value)
Insert characteristic table.
insertStyleSelectionList(ilTemplate $a_tpl, string $a_selected)
Insert style selection list.
static _getCharacteristics(int $a_style_id)
Get characteristics.
editJS()
Edit paragraph (Ajax mode, sends the content of the paragraph)
create()
create new paragraph in dom and update page in db
executeCommand()
execute command
static _getStandardTextCharacteristics()
Get standard characteristics.
determineCharacteristic(bool $a_insert=false)
Determine current characteristic.
static _getStandardCharacteristics()
Get standard characteristics.
update()
update paragraph in dom and update page in db
static getStyleSelector(string $a_selected, array $a_chars, bool $a_use_callback=false)
Get style selector.
editMultipleJS()
Edit multiple paragraphs (Ajax mode, sends the content of the paragraphs)
insertHelp(ilTemplate $a_tpl)
Insert Help.
static xml2outputJS(string $s_text)
Prepare content for js output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static attribsToArray(string $a_str)
converts a string of format var1 = "val1" var2 = "val2" ... into an array
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
Style Content CharacteristicManager $char_manager
setCharacteristics(array $a_chars)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupSettingByParentType(string $a_par_type, string $a_name, string $a_default='0')
Lookup setting by parent type.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
exit
Definition: login.php:28
$service
Definition: ltiservices.php:43
$i
Definition: metadata.php:41
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
string $key
Consumer key/client ID value.
Definition: System.php:193
$lng