ILIAS
Release_4_0_x_branch Revision 61816
|
Class ilPCParagraph. More...
Public Member Functions | |
init () | |
Init page content component. | |
setNode (&$a_node) | |
Set Page Content Node. | |
createAtNode (&$node) | |
Create new page content (incl. | |
createAfter ($node) | |
Create paragraph node (incl. | |
create (&$a_pg_obj, $a_hier_id, $a_pc_id="") | |
Create paragraph node (incl. | |
setText ($a_text, $a_auto_split=false) | |
Set (xml) content of text paragraph. | |
getText ($a_short_mode=false) | |
Get (xml) content of paragraph. | |
setCharacteristic ($a_char) | |
Set Characteristic of paragraph. | |
getCharacteristic () | |
Get characteristic of paragraph. | |
setSubCharacteristic ($a_char) | |
set attribute subcharacteristic | |
getAutoIndent () | |
Get AutoIndent (Code Paragraphs) | |
setAutoIndent ($a_char) | |
getSubCharacteristic () | |
get attribute subcharacteristic | |
setDownloadTitle ($a_char) | |
set attribute download title | |
getDownloadTitle () | |
get attribute download title | |
setShowLineNumbers ($a_char) | |
set attribute showlinenumbers | |
getShowLineNumbers () | |
get attribute showlinenumbers | |
setLanguage ($a_lang) | |
set language | |
getLanguage () | |
get language | |
input2xml ($a_text, $a_wysiwyg=0, $a_handle_lists=true) | |
input2xmlReplaceLists ($a_text) | |
Converts xml from DB to output in edit textarea. | |
autoSplit ($a_text) | |
This function splits a paragraph text that has been already processed with input2xml at each header position =header1=, ==header2== or ===header3=== and returns an array that contains the single chunks. | |
handleNextBr ($a_str) | |
Remove preceding | |
removeTrailingBr ($a_str) | |
Remove trailing | |
getType () | |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source. | |
Public Member Functions inherited from ilPageContent | |
__construct ($a_dom) | |
Constructor. | |
& | getNode () |
Get xml node of page content. | |
setHierId ($a_hier_id) | |
Set hierarchical ID in xml structure. | |
getHierId () | |
Get hierarchical id. | |
lookupHierId () | |
Get hierarchical id from dom. | |
readHierId () | |
Read PC Id. | |
setPcId ($a_pcid) | |
Set PC Id. | |
getPCId () | |
Get PC Id. | |
readPCId () | |
Read PC Id. | |
isGreaterHierId ($a, $b) | |
Check whether Hier ID $a is greater than Hier ID $b. | |
setEnabled ($value) | |
Set Enabled value for page content component. | |
enable () | |
Enable page content. | |
disable () | |
Disable page content. | |
isEnabled () | |
Check whether page content is enabled. | |
createPageContentNode ($a_set_this_node=true) | |
Create page content node (always use this method first when adding a new element) |
Static Public Member Functions | |
static | _input2xml ($a_text, $a_lang, $a_wysiwyg=0, $a_handle_lists=true) |
converts user input to xml | |
static | xml2outputReplaceLists ($a_text) |
Replaces
| |
static | segmentString ($a_haystack, $a_needles) |
Segments a string into an array at each position of a substring. | |
static | xml2output ($a_text) |
Converts xml from DB to output in edit textarea. | |
Static Public Member Functions inherited from ilPageContent | |
static | incEdId ($ed_id) |
Increases an hierarchical editing id at lowest level (last number) | |
static | decEdId ($ed_id) |
Decreases an hierarchical editing id at lowest level (last number) | |
static | haveSameContainer ($ed_id1, $ed_id2) |
Check, if two ids are in same container. | |
static | sortHierIds ($a_array) |
Sort an array of Hier IDS in ascending order. |
Data Fields | |
$dom | |
$par_node | |
Data Fields inherited from ilPageContent | |
$hier_id | |
$node | |
$dom |
Additional Inherited Members | |
Protected Member Functions inherited from ilPageContent | |
setType ($a_type) | |
Set Type. |
Class ilPCParagraph.
Paragraph of ilPageObject
Definition at line 17 of file class.ilPCParagraph.php.
|
static |
converts user input to xml
Definition at line 413 of file class.ilPCParagraph.php.
References ilUtil\attribsToArray(), input2xmlReplaceLists(), and ilUtil\stripSlashes().
Referenced by input2xml(), and ilPCDataTableGUI\update().
ilPCParagraph::autoSplit | ( | $a_text | ) |
This function splits a paragraph text that has been already processed with input2xml at each header position =header1=, ==header2== or ===header3=== and returns an array that contains the single chunks.
Definition at line 1025 of file class.ilPCParagraph.php.
References $n, handleNextBr(), and removeTrailingBr().
Referenced by setText().
ilPCParagraph::create | ( | & | $a_pg_obj, |
$a_hier_id, | |||
$a_pc_id = "" |
|||
) |
Create paragraph node (incl.
page content node) at given hierarchical ID.
object | $a_pg_obj | Page Object |
string | $a_hier_id | Hierarchical ID |
Definition at line 95 of file class.ilPCParagraph.php.
References IL_INSERT_AFTER.
ilPCParagraph::createAfter | ( | $node | ) |
Create paragraph node (incl.
page content node) after given node.
object | $node | Predecessing node |
Definition at line 71 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
ilPCParagraph::createAtNode | ( | & | $node | ) |
Create new page content (incl.
paragraph) node at node
object | $node | Parent Node for Page Content |
Definition at line 56 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
ilPCParagraph::getAutoIndent | ( | ) |
Get AutoIndent (Code Paragraphs)
string | Auto Indent attribute |
Definition at line 314 of file class.ilPCParagraph.php.
ilPCParagraph::getCharacteristic | ( | ) |
Get characteristic of paragraph.
Definition at line 282 of file class.ilPCParagraph.php.
Referenced by getType(), and setText().
ilPCParagraph::getDownloadTitle | ( | ) |
get attribute download title
Definition at line 364 of file class.ilPCParagraph.php.
ilPCParagraph::getLanguage | ( | ) |
get language
Definition at line 400 of file class.ilPCParagraph.php.
Referenced by input2xml(), and setText().
ilPCParagraph::getShowLineNumbers | ( | ) |
get attribute showlinenumbers
Definition at line 384 of file class.ilPCParagraph.php.
ilPCParagraph::getSubCharacteristic | ( | ) |
get attribute subcharacteristic
Definition at line 337 of file class.ilPCParagraph.php.
ilPCParagraph::getText | ( | $a_short_mode = false | ) |
Get (xml) content of paragraph.
Definition at line 239 of file class.ilPCParagraph.php.
ilPCParagraph::getType | ( | ) |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source.
Reimplemented from ilPageContent.
Definition at line 1200 of file class.ilPCParagraph.php.
References getCharacteristic().
ilPCParagraph::handleNextBr | ( | $a_str | ) |
Remove preceding
Definition at line 1165 of file class.ilPCParagraph.php.
Referenced by autoSplit().
ilPCParagraph::init | ( | ) |
Init page content component.
Reimplemented from ilPageContent.
Definition at line 25 of file class.ilPCParagraph.php.
References ilPageContent\setType().
ilPCParagraph::input2xml | ( | $a_text, | |
$a_wysiwyg = 0 , |
|||
$a_handle_lists = true |
|||
) |
Definition at line 405 of file class.ilPCParagraph.php.
References _input2xml(), and getLanguage().
ilPCParagraph::input2xmlReplaceLists | ( | $a_text | ) |
Converts xml from DB to output in edit textarea.
string | $a_text | xml from db |
Definition at line 636 of file class.ilPCParagraph.php.
References $row.
Referenced by _input2xml().
ilPCParagraph::removeTrailingBr | ( | $a_str | ) |
Remove trailing
Definition at line 1188 of file class.ilPCParagraph.php.
Referenced by autoSplit().
|
static |
Segments a string into an array at each position of a substring.
Definition at line 819 of file class.ilPCParagraph.php.
Referenced by xml2outputReplaceLists().
ilPCParagraph::setAutoIndent | ( | $a_char | ) |
Definition at line 319 of file class.ilPCParagraph.php.
ilPCParagraph::setCharacteristic | ( | $a_char | ) |
Set Characteristic of paragraph.
string | $a_char | Characteristic |
Definition at line 262 of file class.ilPCParagraph.php.
ilPCParagraph::setDownloadTitle | ( | $a_char | ) |
set attribute download title
Definition at line 346 of file class.ilPCParagraph.php.
ilPCParagraph::setLanguage | ( | $a_lang | ) |
set language
Definition at line 392 of file class.ilPCParagraph.php.
ilPCParagraph::setNode | ( | & | $a_node | ) |
Set Page Content Node.
object | $a_node | Page Content DOM Node |
Reimplemented from ilPageContent.
Definition at line 35 of file class.ilPCParagraph.php.
ilPCParagraph::setShowLineNumbers | ( | $a_char | ) |
set attribute showlinenumbers
Definition at line 373 of file class.ilPCParagraph.php.
ilPCParagraph::setSubCharacteristic | ( | $a_char | ) |
set attribute subcharacteristic
Definition at line 294 of file class.ilPCParagraph.php.
ilPCParagraph::setText | ( | $a_text, | |
$a_auto_split = false |
|||
) |
Set (xml) content of text paragraph.
string | $a_text | text content |
boolean | $a_auto_split | auto split paragraph at headlines true/false |
Definition at line 111 of file class.ilPCParagraph.php.
References $error, ilPageContent\$node, $ok, $res, $t, autoSplit(), DOMXML_LOAD_PARSING, domxml_open_mem(), getCharacteristic(), getLanguage(), xpath_eval(), and xpath_new_context().
|
static |
Converts xml from DB to output in edit textarea.
string | $a_text | xml from db |
Definition at line 864 of file class.ilPCParagraph.php.
References $target_id, $target_type, ilObject\_lookupType(), ilUtil\attribsToArray(), and xml2outputReplaceLists().
Referenced by ilPCDataTableGUI\editData(), ilPageObject\getPageContentsHashes(), ilGlossaryPresentationGUI\listTermByGiven(), and ilObjGlossaryGUI\listTerms().
|
static |
Replaces
with *.
string | $a_text | xml from db |
Definition at line 723 of file class.ilPCParagraph.php.
References $li, and segmentString().
Referenced by xml2output().
ilPCParagraph::$dom |
Definition at line 19 of file class.ilPCParagraph.php.
ilPCParagraph::$par_node |
Definition at line 20 of file class.ilPCParagraph.php.