ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class ilPCParagraph. More...
Public Member Functions | |
init () | |
Init page content component. More... | |
setNode ($a_node) | |
Set Page Content Node. More... | |
createAtNode (&$node) | |
Create new page content (incl. More... | |
createBeforeNode (&$node) | |
Create new page content (incl. More... | |
createAfter ($node) | |
Create paragraph node (incl. More... | |
create (&$a_pg_obj, $a_hier_id, $a_pc_id="") | |
Create paragraph node (incl. More... | |
setText ($a_text, $a_auto_split=false) | |
Set (xml) content of text paragraph. More... | |
getText ($a_short_mode=false) | |
Get (xml) content of paragraph. More... | |
getParagraphSequenceContent ($a_pg_obj) | |
Get paragraph sequenc of current paragraph. More... | |
setCharacteristic ($a_char) | |
Set Characteristic of paragraph. More... | |
getCharacteristic () | |
Get characteristic of paragraph. More... | |
setSubCharacteristic ($a_char) | |
set attribute subcharacteristic More... | |
getAutoIndent () | |
Get AutoIndent (Code Paragraphs) More... | |
setAutoIndent ($a_char) | |
getSubCharacteristic () | |
get attribute subcharacteristic More... | |
setDownloadTitle ($a_char) | |
set attribute download title More... | |
getDownloadTitle () | |
get attribute download title More... | |
setShowLineNumbers ($a_char) | |
set attribute showlinenumbers More... | |
getShowLineNumbers () | |
get attribute showlinenumbers More... | |
setLanguage ($a_lang) | |
set language More... | |
getLanguage () | |
get language More... | |
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. More... | |
handleNextBr ($a_str) | |
Remove preceding More... | |
removeTrailingBr ($a_str) | |
Remove trailing More... | |
getType () | |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source. More... | |
saveJS ($a_pg_obj, $a_content, $a_char, $a_pc_id, $a_insert_at="") | |
Save input coming from ajax. More... | |
getLastSavedPCId ($a_pg_obj, $a_as_ajax_str=false) | |
Get last inserted pc ids. More... | |
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) More... | |
autoLinkGlossaries ($a_glos) | |
Auto link glossaries. More... | |
getJavascriptFiles ($a_mode) | |
Get Javascript files. More... | |
getOnloadCode ($a_mode) | |
Get onload code. More... | |
Public Member Functions inherited from ilPageContent | |
__construct ($a_pg_obj) | |
Constructor. More... | |
setPage ($a_val) | |
Set page. More... | |
getPage () | |
Get page. More... | |
init () | |
Init object. More... | |
getType () | |
Get type of page content. More... | |
setNode ($a_node) | |
Set xml node of page content. More... | |
& | getNode () |
Get xml node of page content. More... | |
getJavascriptFiles ($a_mode) | |
Get Javascript files. More... | |
getCssFiles ($a_mode) | |
Get css files. More... | |
getOnloadCode ($a_mode) | |
Get on load code. More... | |
setHierId ($a_hier_id) | |
Set hierarchical ID in xml structure. More... | |
getHierId () | |
Get hierarchical id. More... | |
lookupHierId () | |
Get hierarchical id from dom. More... | |
readHierId () | |
Read PC Id. More... | |
setPcId ($a_pcid) | |
Set PC Id. More... | |
getPCId () | |
Get PC Id. More... | |
setFileDownloadLink ($a_download_link) | |
Set file download link. More... | |
getFileDownloadLink () | |
Get file download link. More... | |
setFullscreenLink ($a_fullscreen_link) | |
Set fullscreen link. More... | |
getFullscreenLink () | |
Get fullscreen link. More... | |
setSourcecodeDownloadScript ($script_name) | |
Set sourcecode download script. More... | |
getSourcecodeDownloadScript () | |
Get sourcecode download script. More... | |
readPCId () | |
Read PC Id. More... | |
writePCId ($a_pc_id) | |
Write pc id. More... | |
setEnabled ($value) | |
Set Enabled value for page content component. More... | |
enable () | |
Enable page content. More... | |
disable () | |
Disable page content. More... | |
isEnabled () | |
Check whether page content is enabled. More... | |
createPageContentNode ($a_set_this_node=true) | |
Create page content node (always use this method first when adding a new element) More... | |
modifyPageContentPostXsl ($a_output, $a_mode) | |
Modify page content after xsl. More... | |
Static Public Member Functions | |
static | _input2xml ($a_text, $a_lang, $a_wysiwyg=0, $a_handle_lists=true) |
converts user input to xml More... | |
static | intLinks2xml ($a_text) |
internal links to xml More... | |
static | input2xmlReplaceLists ($a_text) |
Converts xml from DB to output in edit textarea. More... | |
static | xml2outputReplaceLists ($a_text) |
Replaces with *. More... | |
static | segmentString ($a_haystack, $a_needles) |
Segments a string into an array at each position of a substring. More... | |
static | xml2output ($a_text, $a_wysiwyg=false, $a_replace_lists=true) |
Converts xml from DB to output in edit textarea. More... | |
static | handleAjaxContent ($a_content) |
Handle ajax content. More... | |
static | handleAjaxContentPost ($text) |
Post input2xml handling of ajax content. More... | |
static | autoLinkGlossariesPage ($a_page, $a_terms) |
Auto link glossary of whole page. More... | |
static | afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation) |
After page has been updated (or created) More... | |
static | beforePageDelete ($a_page) |
Before page is being deleted. More... | |
static | afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr) |
After page history entry has been created. More... | |
static | saveAnchors ($a_page, $a_domdoc) |
Save anchors. More... | |
static | _deleteAnchors ($a_parent_type, $a_page_id, $a_page_lang) |
Delete anchors of a page. More... | |
static | _saveAnchor ($a_parent_type, $a_page_id, $a_page_lang, $a_anchor_name) |
Save an anchor. More... | |
static | _readAnchors ($a_parent_type, $a_page_id, $a_page_lang="-") |
Read anchors of a page. More... | |
static | saveMetaKeywords ($a_page, $a_domdoc) |
save all keywords More... | |
Static Public Member Functions inherited from ilPageContent | |
static | incEdId ($ed_id) |
Increases an hierarchical editing id at lowest level (last number) More... | |
static | decEdId ($ed_id) |
Decreases an hierarchical editing id at lowest level (last number) More... | |
static | haveSameContainer ($ed_id1, $ed_id2) |
Check, if two ids are in same container. More... | |
static | sortHierIds ($a_array) |
Sort an array of Hier IDS in ascending order. More... | |
static | isGreaterHierId ($a, $b) |
Check whether Hier ID $a is greater than Hier ID $b. More... | |
static | getLangVars () |
Get lang vars needed for editing. More... | |
static | handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false) |
Handle copied content. More... | |
static | afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation) |
After page has been updated (or created) More... | |
static | beforePageDelete ($a_page) |
Before page is being deleted. More... | |
static | afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr) |
After page history entry has been created. More... | |
Data Fields | |
$dom | |
$par_node | |
Data Fields inherited from ilPageContent | |
$hier_id | |
$node | |
$dom | |
$page_lang | |
Static Protected Member Functions | |
static | getBBMap () |
Get bb to xml tag map. More... | |
static | getXMLTagMap () |
Get tag to bb map. More... | |
static | replaceBBCode ($a_text, $a_bb, $a_tag) |
Replace bb code. More... | |
static | linkTermsInDom ($a_dom, $a_terms, $a_par_node=null) |
Link terms in a dom page object in bb style. More... | |
Static Protected Attributes | |
static | $bb_tags |
Additional Inherited Members | |
Protected Member Functions inherited from ilPageContent | |
setType ($a_type) | |
Set Type. More... | |
Protected Attributes inherited from ilPageContent | |
$file_download_link | |
$fullscreen_link | |
$sourcecode_download_script | |
$log | |
Class ilPCParagraph.
Paragraph of ilPageObject
Definition at line 16 of file class.ilPCParagraph.php.
|
static |
Delete anchors of a page.
Definition at line 2022 of file class.ilPCParagraph.php.
References $ilDB.
|
static |
converts user input to xml
Definition at line 550 of file class.ilPCParagraph.php.
References array, ilUtil\attribsToArray(), input2xmlReplaceLists(), and ilUtil\stripSlashes().
Referenced by input2xml(), ilPCDataTableGUI\update(), and ilPCDataTableGUI\updateJS().
|
static |
Read anchors of a page.
Definition at line 2052 of file class.ilPCParagraph.php.
Referenced by ilInternalLinkGUI\showLinkHelp().
|
static |
|
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 |
Definition at line 1990 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 |
Definition at line 1964 of file class.ilPCParagraph.php.
ilPCParagraph::autoLinkGlossaries | ( | $a_glos | ) |
Auto link glossaries.
Definition at line 1755 of file class.ilPCParagraph.php.
References $t, $text, ilObject\_lookupType(), array, ilGlossaryTerm\getTermList(), and getText().
|
static |
Auto link glossary of whole page.
Definition at line 1946 of file class.ilPCParagraph.php.
Referenced by ilObjGlossary\autoLinkGlossaryTerms(), and ilObjContentObject\autoLinkGlossaryTerms().
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 1279 of file class.ilPCParagraph.php.
References $n, array, handleNextBr(), and removeTrailingBr().
Referenced by setText().
|
static |
Before page is being deleted.
object | $a_page | page object |
Definition at line 1976 of file class.ilPCParagraph.php.
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 144 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 120 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 91 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
ilPCParagraph::createBeforeNode | ( | & | $node | ) |
Create new page content (incl.
paragraph) node at node
object | $node | Parent Node for Page Content |
Definition at line 105 of file class.ilPCParagraph.php.
References ilPageContent\$node, and ilPageContent\createPageContentNode().
ilPCParagraph::getAutoIndent | ( | ) |
Get AutoIndent (Code Paragraphs)
string | Auto Indent attribute |
Definition at line 435 of file class.ilPCParagraph.php.
|
staticprotected |
ilPCParagraph::getCharacteristic | ( | ) |
Get characteristic of paragraph.
Definition at line 403 of file class.ilPCParagraph.php.
Referenced by getType(), and setText().
ilPCParagraph::getDownloadTitle | ( | ) |
get attribute download title
Definition at line 485 of file class.ilPCParagraph.php.
ilPCParagraph::getJavascriptFiles | ( | $a_mode | ) |
Get Javascript files.
Definition at line 2153 of file class.ilPCParagraph.php.
References array, and ilLinkifyUtil\getLocalJsPaths().
ilPCParagraph::getLanguage | ( | ) |
get language
Definition at line 521 of file class.ilPCParagraph.php.
Referenced by input2xml(), and setText().
ilPCParagraph::getLastSavedPCId | ( | $a_pg_obj, | |
$a_as_ajax_str = false |
|||
) |
Get last inserted pc ids.
Definition at line 1534 of file class.ilPCParagraph.php.
References ilPageContent\$hier_id, and array.
ilPCParagraph::getOnloadCode | ( | $a_mode | ) |
Get onload code.
Definition at line 2172 of file class.ilPCParagraph.php.
References array.
ilPCParagraph::getParagraphSequenceContent | ( | $a_pg_obj | ) |
Get paragraph sequenc of current paragraph.
Definition at line 317 of file class.ilPCParagraph.php.
References ilPageContent\$hier_id, array, ilPageContent\readHierId(), ilPageContent\readPCId(), and ilPCParagraphGUI\xml2outputJS().
ilPCParagraph::getShowLineNumbers | ( | ) |
get attribute showlinenumbers
Definition at line 505 of file class.ilPCParagraph.php.
ilPCParagraph::getSubCharacteristic | ( | ) |
get attribute subcharacteristic
Definition at line 458 of file class.ilPCParagraph.php.
ilPCParagraph::getText | ( | $a_short_mode = false | ) |
Get (xml) content of paragraph.
Definition at line 296 of file class.ilPCParagraph.php.
Referenced by autoLinkGlossaries().
ilPCParagraph::getType | ( | ) |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source.
Definition at line 1454 of file class.ilPCParagraph.php.
References getCharacteristic().
|
staticprotected |
|
static |
Handle ajax content.
Definition at line 1561 of file class.ilPCParagraph.php.
References $a_content, $res, $ret, $text, ilPageContentGUI\_getCommonBBButtons(), ilDOM2Util\addParent(), array, ilUtil\attribsToArray(), ilDOM2Util\changeName(), ilDOM2Util\replaceByChilds(), and ilUtil\stripSlashes().
Referenced by ilPCDataTableGUI\updateJS().
|
static |
Post input2xml handling of ajax content.
Definition at line 1699 of file class.ilPCParagraph.php.
Referenced by saveJS(), and ilPCDataTableGUI\updateJS().
ilPCParagraph::handleNextBr | ( | $a_str | ) |
Remove preceding
Definition at line 1419 of file class.ilPCParagraph.php.
Referenced by autoSplit().
ilPCParagraph::init | ( | ) |
Init page content component.
Definition at line 39 of file class.ilPCParagraph.php.
References ilPageContent\setType().
ilPCParagraph::input2xml | ( | $a_text, | |
$a_wysiwyg = 0 , |
|||
$a_handle_lists = true |
|||
) |
Definition at line 526 of file class.ilPCParagraph.php.
References _input2xml(), and getLanguage().
|
static |
Converts xml from DB to output in edit textarea.
string | $a_text | xml from db |
Definition at line 863 of file class.ilPCParagraph.php.
Referenced by _input2xml(), and ilSCORM2004Asset\convertLists().
|
static |
internal links to xml
Definition at line 689 of file class.ilPCParagraph.php.
References $t, ilObjUser\_lookupId(), ilUtil\attribsToArray(), and user().
|
staticprotected |
Link terms in a dom page object in bb style.
Definition at line 1796 of file class.ilPCParagraph.php.
References $error, ilPageContent\$node, $t, $text, array, domxml_open_mem(), ilUtil\sortArray(), ilStr\strIPos(), ilStr\strLen(), ilStr\strPos(), ilStr\strrPos(), and ilStr\subStr().
ilPCParagraph::removeTrailingBr | ( | $a_str | ) |
Remove trailing
Definition at line 1442 of file class.ilPCParagraph.php.
Referenced by autoSplit().
|
staticprotected |
Replace bb code.
string | $a_text | text |
string | $a_bb | bb tag |
string | $a_tag | xml tag |
Definition at line 539 of file class.ilPCParagraph.php.
|
static |
Save anchors.
string | xml page code |
Definition at line 1999 of file class.ilPCParagraph.php.
References ilPageContent\$node, and array.
ilPCParagraph::saveJS | ( | $a_pg_obj, | |
$a_content, | |||
$a_char, | |||
$a_pc_id, | |||
$a_insert_at = "" |
|||
) |
Save input coming from ajax.
Definition at line 1469 of file class.ilPCParagraph.php.
References $a_content, $ilUser, $t, exit, ilPageContent\getPage(), and handleAjaxContentPost().
|
static |
save all keywords
object | $a_page | page object |
object | $a_domdoc | dom document |
Definition at line 2079 of file class.ilPCParagraph.php.
References $lang, ilPageContent\$node, array, and ilUtil\stripSlashes().
|
static |
Segments a string into an array at each position of a substring.
Definition at line 1046 of file class.ilPCParagraph.php.
References array.
Referenced by xml2outputReplaceLists().
ilPCParagraph::setAutoIndent | ( | $a_char | ) |
Definition at line 440 of file class.ilPCParagraph.php.
ilPCParagraph::setCharacteristic | ( | $a_char | ) |
Set Characteristic of paragraph.
string | $a_char | Characteristic |
Definition at line 383 of file class.ilPCParagraph.php.
ilPCParagraph::setDownloadTitle | ( | $a_char | ) |
set attribute download title
Definition at line 467 of file class.ilPCParagraph.php.
ilPCParagraph::setLanguage | ( | $a_lang | ) |
set language
Definition at line 513 of file class.ilPCParagraph.php.
ilPCParagraph::setNode | ( | $a_node | ) |
Set Page Content Node.
object | $a_node | Page Content DOM Node |
Definition at line 71 of file class.ilPCParagraph.php.
ilPCParagraph::setShowLineNumbers | ( | $a_char | ) |
set attribute showlinenumbers
Definition at line 494 of file class.ilPCParagraph.php.
ilPCParagraph::setSubCharacteristic | ( | $a_char | ) |
set attribute subcharacteristic
Definition at line 415 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 164 of file class.ilPCParagraph.php.
References $error, ilPageContent\$node, $ok, $path, $res, $t, $text, array, autoSplit(), domxml_open_mem(), getCharacteristic(), getLanguage(), ilPageContent\getPage(), xpath_eval(), and xpath_new_context().
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)
Definition at line 1741 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 1091 of file class.ilPCParagraph.php.
References $target, $target_id, $target_type, ilObjUser\_lookupLogin(), ilObject\_lookupType(), array, ilUtil\attribsToArray(), and xml2outputReplaceLists().
Referenced by ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPresentationListTableGUI\fillRow(), ilTermListTableGUI\fillRow(), and ilPageObject\getPageContentsHashes().
|
static |
Replaces
with *.
string | $a_text | xml from db |
Definition at line 950 of file class.ilPCParagraph.php.
References $li, $text, array, and segmentString().
Referenced by xml2output().
|
staticprotected |
Definition at line 22 of file class.ilPCParagraph.php.
ilPCParagraph::$dom |
Definition at line 18 of file class.ilPCParagraph.php.
Referenced by ilPCSourceCode\modifyPageContentPostXsl().
ilPCParagraph::$par_node |
Definition at line 19 of file class.ilPCParagraph.php.