◆ __construct()
ILIAS\COPage\PC\Paragraph\ParagraphManager::__construct |
( |
| ) |
|
Definition at line 31 of file class.ParagraphManager.php.
References $DIC.
34 $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
35 $this->http_util = $DIC->copage()->internal()->gui()->httpUtil();
◆ getFirstParagraphText()
ILIAS\COPage\PC\Paragraph\ParagraphManager::getFirstParagraphText |
( |
\ilPageObject |
$page | ) |
|
Definition at line 66 of file class.ParagraphManager.php.
References $path, and ilPageObject\getDomDoc().
68 $dom = $page->getDomDoc();
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();
◆ getParagraphForPCID()
ILIAS\COPage\PC\Paragraph\ParagraphManager::getParagraphForPCID |
( |
\ilPageObject |
$page, |
|
|
string |
$pcid |
|
) |
| |
Definition at line 83 of file class.ParagraphManager.php.
References $path, ilPageObject\getDomDoc(), and null.
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);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ send()
ILIAS\COPage\PC\Paragraph\ParagraphManager::send |
( |
\DOMDocument |
$dom, |
|
|
string |
$par_id, |
|
|
string |
$filename |
|
) |
| |
Definition at line 38 of file class.ParagraphManager.php.
References $path.
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);
◆ $dom_util
ILIAS COPage Dom DomUtil ILIAS\COPage\PC\Paragraph\ParagraphManager::$dom_util |
|
protected |
◆ $http_util
The documentation for this class was generated from the following file: