38         $this->
user = $DIC->user();
    39         $this->
ctrl = $DIC->ctrl();
    40         $this->
lng = $DIC->language();
    54         $lng = $DIC->language();
    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")
    73         return [
"Mnemonic", 
"Attention"];
    82         $request = $DIC->copage()->internal()
    88         $service = $DIC->contentStyle()->internal();
    92         if ($a_style_id > 0 &&
    94             $access_manager = 
$service->domain()->access(
   104                 [
"text_block", 
"heading1", 
"heading2", 
"heading3"],
   108             $new_chars = array();
   109             foreach (
$chars as $char) {
   110                 if (($st_chars[$char->getCharacteristic()] ?? 
"") != 
"") {      
   113                         $char->getCharacteristic()
   116                         $title = $st_chars[$char->getCharacteristic()];
   118                     $new_chars[$char->getCharacteristic()] = $title;
   120                     $new_chars[$char->getCharacteristic()] = 
$char_manager->getPresentationTitle(
   122                         $char->getCharacteristic()
   135     public static function _getTextCharacteristics(
   137         bool $a_include_core = 
false   143         $service = $DIC->contentStyle()->internal();
   144         $request = $DIC->copage()->internal()
   150         if ($a_style_id > 0 &&
   153             $access_manager = 
$service->domain()->access(
   155                 $DIC->user()->getId()
   165                 [
"text_inline", 
"code_inline"],
   170             foreach ($ti_chars as $k => $v) {
   171                 if (!
$char_manager->isOutdated(
"text_inline", $v->getCharacteristic())) {
   172                     $chars[] = $v->getCharacteristic();
   176             return self::_getStandardTextCharacteristics();
   190         $next_class = $this->
ctrl->getNextClass($this);
   193             array(
"text_block", 
"heading1", 
"heading2", 
"heading3")
   197         $cmd = $this->
ctrl->getCmd();
   199         $this->log->debug(
"ilPCParagraphGUI: executeCommand " . $cmd);
   201         switch ($next_class) {
   203                 $ret = $this->$cmd();
   216         $cmd = $this->
ctrl->getCmd();
   219             if ($cmd == 
"update") {
   220                 $s_char = $this->request->getString(
"par_characteristic");
   222                 $s_char = $this->content_obj->getCharacteristic();
   224                     $s_char = 
"Standard";
   228             if ($cmd == 
"create_par") {
   229                 $s_char = $this->request->getString(
"par_characteristic");
   231                 $s_char = 
"Standard";
   234                 $cont_obj = $this->pg_obj->getContentObject($this->
getHierId());
   235                 if (is_object($cont_obj)) {
   236                     if ($cont_obj->getType() == 
"li" ||
   237                         ($cont_obj->getType() == 
"par" && $cont_obj->getCharacteristic() == 
"List")) {
   241                     if ($cont_obj->getType() == 
"td" ||
   242                         ($cont_obj->getType() == 
"par" && $cont_obj->getCharacteristic() == 
"TableContent")) {
   243                         $s_char = 
"TableContent";
   256         $s_text = $this->content_obj->getText();
   257         $this->log->debug(
"step 1: " . substr($s_text, 0, 1000));
   260         $s_text = $this->content_obj->xml2output($s_text, 
true, 
false);
   261         $this->log->debug(
"step 2: " . substr($s_text, 0, 1000));
   266         $this->log->debug(
"step 3: " . substr($s_text, 0, 1000));
   269         $ids = 
"###" . $this->content_obj->readHierId() . 
":" . $this->content_obj->readPCId() . 
"###" .
   272         $this->log->debug(
"step 4: " . substr($ids . $s_text, 0, 1000));
   282         $s_text = str_replace(
   283             array(
"<SimpleBulletList>", 
"</SimpleBulletList>"),
   284             array(
'<ul class="ilc_list_u_BulletedList">', 
"</ul>"),
   287         while (preg_match(
'~<SimpleBulletList Class=\"([^\"]*)\">~i', $s_text, $found)) {
   289             $s_text = str_replace(
'<SimpleBulletList Class="' . $class . 
'">', 
'<ul class="ilc_list_u_' . $class . 
'">', $s_text);
   291         $s_text = str_replace(
   292             array(
"<SimpleNumberedList>", 
"</SimpleNumberedList>"),
   293             array(
'<ol class="ilc_list_o_NumberedList">', 
"</ol>"),
   296         while (preg_match(
'~<SimpleNumberedList Class=\"([^\"]*)\">~i', $s_text, $found)) {
   298             $s_text = str_replace(
'<SimpleNumberedList Class="' . $class . 
'">', 
'<ol class="ilc_list_o_' . $class . 
'">', $s_text);
   300         $s_text = str_replace(
   301             array(
"<SimpleListItem>", 
"</SimpleListItem>"),
   302             array(
'<li class="ilc_list_item_StandardListItem">', 
"</li>"),
   305         $s_text = str_replace(
   306             array(
"<SimpleListItem/>"),
   307             array(
'<li class="ilc_list_item_StandardListItem"></li>'),
   310         while (preg_match(
'~<SimpleListItem Class=\"([^\"]*)\">~i', $s_text, $found)) {
   312             $s_text = str_replace(
'<SimpleListItem Class="' . $class . 
'">', 
'<li class="ilc_list_item_' . $class . 
'">', $s_text);
   317             if (!in_array($bb, array(
"code", 
"tex", 
"fn", 
"xln", 
"sub", 
"sup"))) {
   318                 $s_text = str_replace(
   320                     '<span class="ilc_text_inline_' . $cl . 
'">',
   323                 $s_text = str_replace(
   332         $ws = 
"[ \t\r\f\v\n]*";
   333         while (preg_match(
"~\[(marked$ws(class$ws=$ws\"([^\"])*\")$ws)\]~i", $s_text, $found)) {
   335             if (isset($attribs[
"class"])) {
   336                 $s_text = str_replace(
"[" . $found[1] . 
"]", 
"<span class=\"ilc_text_inline_" . $attribs[
"class"] . 
"\">", $s_text);
   338                 $s_text = str_replace(
"[" . $found[1] . 
"]", 
"[error:marked" . $found[1] . 
"]", $s_text);
   341         $s_text = preg_replace(
'~\[\/marked\]~i', 
"</span>", $s_text);
   345         $s_text = str_replace(
   346             array(
"[code]", 
"[/code]"),
   347             array(
"<code>", 
"</code>"),
   352         $s_text = str_replace(
   353             array(
"[sup]", 
"[/sup]"),
   354             array(
'<sup class="ilc_sup_Sup">', 
"</sup>"),
   359         $s_text = str_replace(
   360             array(
"[sub]", 
"[/sub]"),
   361             array(
'<sub class="ilc_sub_Sub">', 
"</sub>"),
   374         foreach ($a_err as $err) {
   375             $err_str .= $err[1] . 
"<br />";
   378         $this->log->debug(
"ilPCParagraphGUI, outputError() and exit: " . substr($err_str, 0, 100));
   384         $this->log->debug(
"ilPCParagraphGUI, cancel(): return to parent: jump" . $this->hier_id);
   385         $this->
ctrl->returnToParent($this, 
"jump" . $this->hier_id);
   393         string $a_seleted_value
   399         if (
$chars[$a_seleted_value] == 
"" && ($a_seleted_value != 
"")) {
   401                 array($a_seleted_value => $a_seleted_value),
   406         foreach (
$chars as $char => $char_lang) {
   410                 '<div class="ilc_text_block_' . $char . 
'" style="margin-top:2px; margin-bottom:2px; position:static;">' . $char_lang . 
"</div>"   413             if ($char == $a_seleted_value) {
   416                     ' checked="checked" '   420             if ((($i + 1) % 3) == 0) {  
   430         if ($this->pg_obj->getParentType() == 
"term" ||
   431             $this->pg_obj->getParentType() == 
"lm") {
   432             if ($this->pg_obj->getParentType() != 
"term") {
   450         $a_tpl->
setVariable(
"TXT_HELP", 
"<strong>" . 
$lng->
txt(
"cont_syntax_help") . 
"</strong>");
   460             "==" . 
$lng->
txt(
"cont_Headline2") . 
"==<br />" .
   461             "===" . 
$lng->
txt(
"cont_Headline3") . 
"===");
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
static xml2outputJS(string $s_text)
Prepare content for js output. 
 
getCharacteristicsOfCurrentStyle(array $a_type)
Get characteristics of current style and call setCharacteristics, if style is given. 
 
outputError(array $a_err)
Output error. 
 
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(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
setCharacteristics(array $a_chars)
 
static _getStandardCharacteristics()
Get standard characteristics. 
 
Content object of ilPageObject (see ILIAS DTD). 
 
touchBlock(string $block)
 
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...) 
 
Style Content CharacteristicManager $char_manager
 
setVariable($variable, $value='')
Sets a variable value. 
 
editJS()
Edit paragraph (Ajax mode, sends the content of the paragraph) 
 
static _lookupStyleSheetId(int $a_cont_obj_id)
 
insertCharacteristicTable(ilTemplate $a_tpl, string $a_seleted_value)
Insert characteristic table. 
 
insertHelp(ilTemplate $a_tpl)
Insert Help. 
 
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD) 
 
determineCharacteristic(bool $a_insert=false)
Determine current characteristic. 
 
static _getCharacteristics(int $a_style_id)
Get characteristics. 
 
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading) 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
executeCommand()
execute command 
 
static _getCommonBBButtons()
 
static _lookupType(int $id, bool $reference=false)
 
static _getStandardTextCharacteristics()
Get standard characteristics. 
 
static attribsToArray(string $a_str)
converts a string of format var1 = "val1" var2 = "val2" ... 
 
Class ilPCParagraphGUI User Interface for Paragraph Editing.