ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilPCSourceCode. More...
Public Member Functions | |
init () | |
Init page content component. | |
modifyPageContentPostXsl ($a_output, $outputmode="presentation") | |
Modify page content after xsl. | |
highlightText ($a_text, $proglang, $autoindent) | |
Highligths Text with given ProgLang. | |
hasHighlighter ($hfile_ext) | |
Public Member Functions inherited from ilPCParagraph | |
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. | |
getOnloadCode () | |
Get on load code. | |
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) |
Static Public Member Functions | |
static | getLangVars () |
Get lang vars needed for editing. | |
Static Public Member Functions inherited from ilPCParagraph | |
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 | handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false) |
Handle copied content. |
Additional Inherited Members | |
Data Fields inherited from ilPCParagraph | |
$dom | |
$par_node | |
Protected Member Functions inherited from ilPageContent | |
setType ($a_type) | |
Set Type. | |
Static Protected Member Functions inherited from ilPCParagraph | |
static | linkTermsInDom ($a_dom, $a_terms, $a_par_node=null) |
Link terms in a dom page object in bb style. |
Class ilPCSourceCode.
Paragraph of ilPageObject
Definition at line 17 of file class.ilPCSourceCode.php.
|
static |
Get lang vars needed for editing.
Reimplemented from ilPageContent.
Definition at line 31 of file class.ilPCSourceCode.php.
ilPCSourceCode::hasHighlighter | ( | $hfile_ext | ) |
Definition at line 174 of file class.ilPCSourceCode.php.
Referenced by highlightText().
ilPCSourceCode::highlightText | ( | $a_text, | |
$proglang, | |||
$autoindent | |||
) |
Highligths Text with given ProgLang.
Definition at line 151 of file class.ilPCSourceCode.php.
References hasHighlighter().
Referenced by modifyPageContentPostXsl().
ilPCSourceCode::init | ( | ) |
Init page content component.
Reimplemented from ilPCParagraph.
Definition at line 22 of file class.ilPCSourceCode.php.
References ilPageContent\setType().
ilPCSourceCode::modifyPageContentPostXsl | ( | $a_output, | |
$outputmode = "presentation" |
|||
) |
Modify page content after xsl.
string | $a_output |
Reimplemented from ilPageContent.
Definition at line 42 of file class.ilPCSourceCode.php.
References ilPCParagraph\$dom, $n, $path, $res, ilPageContent\getPage(), highlightText(), xpath_eval(), and xpath_new_context().