| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
Class ilPCParagraph. More...
 Inheritance diagram for ilPCParagraph:
 Inheritance diagram for ilPCParagraph: Collaboration diagram for ilPCParagraph:
 Collaboration diagram for ilPCParagraph:| Public Member Functions | |
| init () | |
| Init page content component. | |
| setNode (&$a_node) | |
| Set Page Content Node. | |
| createAtNode (&$node) | |
| Create new page content (incl. | |
| createBeforeNode (&$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. | |
| getParagraphSequenceContent ($a_pg_obj) | |
| Get paragraph sequenc of current 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) | |
| 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. | |
| saveJS ($a_pg_obj, $a_content, $a_char, $a_pc_id, $a_insert_at="") | |
| Save input coming from ajax. | |
| getLastSavedPCId ($a_pg_obj, $a_as_ajax_str=false) | |
| Get last inserted pc ids. | |
| updatePage ($a_page) | |
| Update page object (it would be better to have this centralized and to change the constructors and pass the page object instead the dom object) | |
| autoLinkGlossaries ($a_glos) | |
| Auto link glossaries. | |
| saveAnchors ($a_page, $a_domdoc) | |
| Save anchors. | |
| saveMetaKeywords ($a_page, $a_domdoc) | |
| save all keywords | |
|  Public Member Functions inherited from ilPageContent | |
| __construct ($a_pg_obj) | |
| Constructor. | |
| setPage ($a_val) | |
| Set page. | |
| getPage () | |
| Get page. | |
| & | getNode () | 
| Get xml node of page content. | |
| getJavascriptFiles () | |
| Get Javascript files. | |
| getCssFiles () | |
| Get css files. | |
| 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. | |
| writePCId ($a_pc_id) | |
| Write 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) | |
| modifyPageContentPostXsl ($a_output, $a_mode) | |
| Modify page content after xsl. | |
| Static Public Member Functions | |
| static | _input2xml ($a_text, $a_lang, $a_wysiwyg=0, $a_handle_lists=true) | 
| converts user input to xml | |
| static | intLinks2xml ($a_text) | 
| internal links to xml | |
| static | input2xmlReplaceLists ($a_text) | 
| Converts xml from DB to output in edit textarea. | |
| 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, $a_wysiwyg=false, $a_replace_lists=true) | 
| Converts xml from DB to output in edit textarea. | |
| static | handleAjaxContent ($a_content) | 
| Handle ajax content. | |
| static | handleAjaxContentPost ($text) | 
| Post input2xml handling of ajax content. | |
| static | autoLinkGlossariesPage ($a_page, $a_terms) | 
| Auto link glossary of whole page. | |
| static | afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation) | 
| After page has been updated (or created) | |
| static | beforePageDelete ($a_page) | 
| Before page is being deleted. | |
| static | afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr) | 
| After page history entry has been created. | |
| static | _deleteAnchors ($a_parent_type, $a_page_id, $a_page_lang) | 
| Delete anchors of a page. | |
| static | _saveAnchor ($a_parent_type, $a_page_id, $a_page_lang, $a_anchor_name) | 
| Save an anchor. | |
| static | _readAnchors ($a_parent_type, $a_page_id, $a_page_lang="-") | 
| Read anchors of a page. | |
|  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. | |
| static | getLangVars () | 
| Get lang vars needed for editing. | |
| static | handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false) | 
| Handle copied content. | |
| Data Fields | |
| $dom | |
| $par_node | |
|  Data Fields inherited from ilPageContent | |
| $hier_id | |
| $node | |
| $dom | |
| Static Protected Member Functions | |
| static | linkTermsInDom ($a_dom, $a_terms, $a_par_node=null) | 
| Link terms in a dom page object in bb style. | |
| Additional Inherited Members | |
|  Protected Member Functions inherited from ilPageContent | |
| setType ($a_type) | |
| Set Type. | |
Class ilPCParagraph.
Paragraph of ilPageObject
Definition at line 16 of file class.ilPCParagraph.php.
| 
 | static | 
Delete anchors of a page.
Definition at line 1896 of file class.ilPCParagraph.php.
Referenced by beforePageDelete(), and saveAnchors().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
converts user input to xml
Definition at line 494 of file class.ilPCParagraph.php.
References ilUtil\attribsToArray(), input2xmlReplaceLists(), intLinks2xml(), and ilUtil\stripSlashes().
Referenced by input2xml(), ilPCDataTableGUI\update(), and ilPCDataTableGUI\updateJS().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Read anchors of a page.
Definition at line 1926 of file class.ilPCParagraph.php.
Referenced by ilInternalLinkGUI\showLinkHelp().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Save an anchor.
Definition at line 1910 of file class.ilPCParagraph.php.
Referenced by saveAnchors().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
After page history entry has been created.
| object | $a_page | page object | 
| DOMDocument | $a_old_domdoc | old dom document | 
| string | $a_old_xml | old xml | 
| integer | $a_old_nr | history number | 
Reimplemented from ilPageContent.
Definition at line 1864 of file class.ilPCParagraph.php.
| 
 | static | 
After page has been updated (or created)
| object | $a_page | page object | 
| DOMDocument | $a_domdoc | dom document | 
| string | $a_xml | xml | 
| bool | $a_creation | true on creation, otherwise false | 
Reimplemented from ilPageContent.
Definition at line 1838 of file class.ilPCParagraph.php.
References saveAnchors(), and saveMetaKeywords().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::autoLinkGlossaries | ( | $a_glos | ) | 
Auto link glossaries.
| @return | 
Definition at line 1643 of file class.ilPCParagraph.php.
References $t, ilObject\_lookupType(), ilGlossaryTerm\getTermList(), getText(), and linkTermsInDom().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Auto link glossary of whole page.
| @return | 
Definition at line 1820 of file class.ilPCParagraph.php.
References linkTermsInDom().
Referenced by ilObjContentObject\autoLinkGlossaryTerms().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 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 1209 of file class.ilPCParagraph.php.
References $n, handleNextBr(), and removeTrailingBr().
Referenced by setText().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Before page is being deleted.
| object | $a_page | page object | 
Reimplemented from ilPageContent.
Definition at line 1850 of file class.ilPCParagraph.php.
References _deleteAnchors().
 Here is the call graph for this function:
 Here is the call graph for this function:| 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 107 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 83 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::createAtNode | ( | & | $node | ) | 
Create new page content (incl.
paragraph) node at node
| object | $node | Parent Node for Page Content | 
Definition at line 54 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::createBeforeNode | ( | & | $node | ) | 
Create new page content (incl.
paragraph) node at node
| object | $node | Parent Node for Page Content | 
Definition at line 68 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::getAutoIndent | ( | ) | 
Get AutoIndent (Code Paragraphs)
| string | Auto Indent attribute | 
Definition at line 395 of file class.ilPCParagraph.php.
| ilPCParagraph::getCharacteristic | ( | ) | 
Get characteristic of paragraph.
Definition at line 363 of file class.ilPCParagraph.php.
Referenced by getType(), and setText().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::getDownloadTitle | ( | ) | 
get attribute download title
Definition at line 445 of file class.ilPCParagraph.php.
| ilPCParagraph::getLanguage | ( | ) | 
get language
Definition at line 481 of file class.ilPCParagraph.php.
Referenced by input2xml(), and setText().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::getLastSavedPCId | ( | $a_pg_obj, | |
| $a_as_ajax_str = false | |||
| ) | 
Get last inserted pc ids.
| @return | 
Definition at line 1458 of file class.ilPCParagraph.php.
References ilPageContent\$hier_id.
| ilPCParagraph::getParagraphSequenceContent | ( | $a_pg_obj | ) | 
Get paragraph sequenc of current paragraph.
Definition at line 277 of file class.ilPCParagraph.php.
References ilPageContent\$hier_id, ilPageContent\readHierId(), ilPageContent\readPCId(), and ilPCParagraphGUI\xml2outputJS().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::getShowLineNumbers | ( | ) | 
get attribute showlinenumbers
Definition at line 465 of file class.ilPCParagraph.php.
| ilPCParagraph::getSubCharacteristic | ( | ) | 
get attribute subcharacteristic
Definition at line 418 of file class.ilPCParagraph.php.
| ilPCParagraph::getText | ( | $a_short_mode = false | ) | 
Get (xml) content of paragraph.
Definition at line 256 of file class.ilPCParagraph.php.
Referenced by autoLinkGlossaries().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::getType | ( | ) | 
Need to override getType from ilPageContent to distinguish between Pararagraph and Source.
Reimplemented from ilPageContent.
Definition at line 1384 of file class.ilPCParagraph.php.
References getCharacteristic().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Handle ajax content.
Definition at line 1485 of file class.ilPCParagraph.php.
References $res, $ret, ilPageContentGUI\_getCommonBBButtons(), ilDOM2Util\addParent(), ilDOM2Util\changeName(), ilDOM2Util\replaceByChilds(), and ilUtil\stripSlashes().
Referenced by saveJS(), and ilPCDataTableGUI\updateJS().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Post input2xml handling of ajax content.
Definition at line 1587 of file class.ilPCParagraph.php.
Referenced by saveJS(), and ilPCDataTableGUI\updateJS().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::handleNextBr | ( | $a_str | ) | 
Remove preceding 
 
Definition at line 1349 of file class.ilPCParagraph.php.
Referenced by autoSplit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::init | ( | ) | 
Init page content component.
Reimplemented from ilPageContent.
Reimplemented in ilPCSourceCode.
Definition at line 24 of file class.ilPCParagraph.php.
References ilPageContent\setType().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::input2xml | ( | $a_text, | |
| $a_wysiwyg = 0, | |||
| $a_handle_lists = true | |||
| ) | 
Definition at line 486 of file class.ilPCParagraph.php.
References _input2xml(), and getLanguage().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Converts xml from DB to output in edit textarea.
| string | $a_text | xml from db | 
Definition at line 796 of file class.ilPCParagraph.php.
References $row.
Referenced by _input2xml(), and ilSCORM2004Asset\convertLists().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
internal links to xml
| @return | 
Definition at line 634 of file class.ilPCParagraph.php.
References $t, and ilUtil\attribsToArray().
Referenced by _input2xml(), and linkTermsInDom().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Link terms in a dom page object in bb style.
| @return | 
Definition at line 1684 of file class.ilPCParagraph.php.
References ilPageContent\$node, $t, DOMXML_LOAD_PARSING, domxml_open_mem(), intLinks2xml(), and ilUtil\sortArray().
Referenced by autoLinkGlossaries(), and autoLinkGlossariesPage().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::removeTrailingBr | ( | $a_str | ) | 
Remove trailing 
 
Definition at line 1372 of file class.ilPCParagraph.php.
Referenced by autoSplit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::saveAnchors | ( | $a_page, | |
| $a_domdoc | |||
| ) | 
Save anchors.
| string | xml page code | 
Definition at line 1873 of file class.ilPCParagraph.php.
References ilPageContent\$node, _deleteAnchors(), and _saveAnchor().
Referenced by afterPageUpdate().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::saveJS | ( | $a_pg_obj, | |
| $a_content, | |||
| $a_char, | |||
| $a_pc_id, | |||
| $a_insert_at = "" | |||
| ) | 
Save input coming from ajax.
| @return | 
Definition at line 1399 of file class.ilPCParagraph.php.
References $ilUser, $t, exit, ilPageContent\getPage(), handleAjaxContent(), and handleAjaxContentPost().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::saveMetaKeywords | ( | $a_page, | |
| $a_domdoc | |||
| ) | 
save all keywords
| object | $a_page | page object | 
| object | $a_domdoc | dom document | 
Definition at line 1953 of file class.ilPCParagraph.php.
References $lang, ilPageContent\$node, and ilUtil\stripSlashes().
Referenced by afterPageUpdate().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Segments a string into an array at each position of a substring.
Definition at line 979 of file class.ilPCParagraph.php.
Referenced by xml2outputReplaceLists().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::setAutoIndent | ( | $a_char | ) | 
Definition at line 400 of file class.ilPCParagraph.php.
| ilPCParagraph::setCharacteristic | ( | $a_char | ) | 
Set Characteristic of paragraph.
| string | $a_char | Characteristic | 
Definition at line 343 of file class.ilPCParagraph.php.
| ilPCParagraph::setDownloadTitle | ( | $a_char | ) | 
set attribute download title
Definition at line 427 of file class.ilPCParagraph.php.
| ilPCParagraph::setLanguage | ( | $a_lang | ) | 
set language
Definition at line 473 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 34 of file class.ilPCParagraph.php.
| ilPCParagraph::setShowLineNumbers | ( | $a_char | ) | 
set attribute showlinenumbers
Definition at line 454 of file class.ilPCParagraph.php.
| ilPCParagraph::setSubCharacteristic | ( | $a_char | ) | 
set attribute subcharacteristic
Definition at line 375 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 127 of file class.ilPCParagraph.php.
References ilPageContent\$node, $ok, $path, $res, $t, autoSplit(), DOMXML_LOAD_PARSING, domxml_open_mem(), getCharacteristic(), getLanguage(), ilPageContent\getPage(), xpath_eval(), and xpath_new_context().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilPCParagraph::updatePage | ( | $a_page | ) | 
Update page object (it would be better to have this centralized and to change the constructors and pass the page object instead the dom object)
| @return | 
Definition at line 1629 of file class.ilPCParagraph.php.
References $ret.
| 
 | static | 
Converts xml from DB to output in edit textarea.
| string | $a_text | xml from db | 
Definition at line 1024 of file class.ilPCParagraph.php.
References $target_id, $target_type, ilObject\_lookupType(), ilUtil\attribsToArray(), and xml2outputReplaceLists().
Referenced by ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPresentationListTableGUI\fillRow(), ilTermListTableGUI\fillRow(), and ilPageObject\getPageContentsHashes().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Replaces
with *.
| string | $a_text | xml from db | 
Definition at line 883 of file class.ilPCParagraph.php.
References segmentString().
Referenced by xml2output().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilPCParagraph::$dom | 
Definition at line 18 of file class.ilPCParagraph.php.
| ilPCParagraph::$par_node | 
Definition at line 19 of file class.ilPCParagraph.php.