19 declare(strict_types=1);
    34         $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
    35         $this->http_util = $DIC->copage()->internal()->gui()->httpUtil();
    44         $path = 
"/descendant::Paragraph[position() = $par_id]";
    45         $nodes = $this->dom_util->path(
    49         if (count($nodes) != 1) {
    50             throw new \ilCOPageException(
"Paragraph not found.");
    53         $context_node = $nodes->item(0);
    54         foreach ($context_node->childNodes as $child) {
    55             $content .= $this->dom_util->dump($child);
    58         $content = str_replace(
"<br />", 
"\n", $content);
    59         $content = str_replace(
"<br/>", 
"\n", $content);
    61         $plain_content = html_entity_decode($content);
    63         $this->http_util->deliverString($plain_content, $filename);
    70             $path = 
"//Paragraph[1]";
    71             $nodes = $this->dom_util->path($dom, 
$path);
    72             if (count($nodes) > 0) {
    73                 $cont_node = $nodes->item(0)->parentNode;
    74                 $par = new \ilPCParagraph($page);
    75                 $par->setDomNode($cont_node);
    76                 $text = $par->getText();
    87             $path = 
"//PageContent[@PCID='" . $pcid . 
"']/Paragraph[1]";
    88             $nodes = $this->dom_util->path($dom, 
$path);
    89             if (count($nodes) > 0) {
    90                 $cont_node = $nodes->item(0)->parentNode;
    91                 $par = new \ilPCParagraph($page);
    92                 $par->setDomNode($cont_node);
 
getParagraphForPCID(\ilPageObject $page, string $pcid)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getDomDoc()
Get dom doc (DOMDocument) 
 
ILIAS COPage Dom DomUtil $dom_util
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
send(\DOMDocument $dom, string $par_id, string $filename)
 
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD) 
 
ILIAS Repository HTTP HTTPUtil $http_util
 
getFirstParagraphText(\ilPageObject $page)