ILIAS
trunk Revision v11.0_alpha-1744-gb0451eebef4
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
init () | |
create (ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="", bool $from_placeholder=false) | |
Create paragraph node (incl. More... | |
setText (string $a_text, bool $a_auto_split=false) | |
Set (xml) content of text paragraph. More... | |
getText (bool $a_short_mode=false) | |
Get (xml) content of paragraph. More... | |
setCharacteristic (string $a_char) | |
getCharacteristic () | |
setSubCharacteristic (string $a_char) | |
getAutoIndent () | |
setAutoIndent (string $ind) | |
getSubCharacteristic () | |
setDownloadTitle (string $title) | |
getDownloadTitle () | |
setShowLineNumbers (string $a_char) | |
getShowLineNumbers () | |
setLanguage (string $a_lang) | |
getLanguage () | |
input2xml (string $a_text, bool $a_wysiwyg=false, bool $a_handle_lists=true) | |
autoSplit (string $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 (string $a_str) | |
Remove preceding More... | |
removeTrailingBr (string $a_str) | |
Remove trailing More... | |
getType () | |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source. More... | |
saveJS (ilPageObject $a_pg_obj, string $a_content, string $a_char, string $a_pc_id, string $a_insert_at="", bool $from_placeholder=false) | |
Save input coming from ajax. More... | |
getLastSavedPCId (ilPageObject $a_pg_obj, bool $a_as_ajax_str=false) | |
Get last inserted pc ids. More... | |
updatePage (ilPageObject $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 (array $a_glos) | |
getJavascriptFiles (string $a_mode) | |
getOnloadCode (string $a_mode) | |
getModel () | |
insert (\ilPageObject $page, string $a_content, string $a_char, string $a_pc_id, string $a_insert_at="", string $a_new_pc_id="") | |
Save input coming from ajax. More... | |
![]() | |
__construct (ilPageObject $a_pg_obj, ?PageManagerInterface $page_manager=null, ?ObjectAdapterInterface $object_adapter=null) | |
setPage (ilPageObject $a_val) | |
getPage () | |
init () | |
Init object. More... | |
getType () | |
getDomNode () | |
getDomDoc () | |
setDomNode (DOMNode $node) | |
getChildNode () | |
getJavascriptFiles (string $a_mode) | |
getCssFiles (string $a_mode) | |
getOnloadCode (string $a_mode) | |
setHierId (string $a_hier_id) | |
getHierId () | |
lookupHierId () | |
readHierId () | |
setPcId (string $a_pcid) | |
getPCId () | |
setFileDownloadLink (string $a_download_link) | |
getFileDownloadLink () | |
setProfileBackUrl (string $url) | |
getProfileBackUrl () | |
setFullscreenLink (string $a_fullscreen_link) | |
getFullscreenLink () | |
setSourcecodeDownloadScript (string $script_name) | |
getSourcecodeDownloadScript () | |
readPCId () | |
writePCId (string $a_pc_id) | |
setEnabled (string $value) | |
Set Enabled value for page content component. More... | |
enable () | |
disable () | |
isEnabled () | |
createPageContentNode (bool $a_set_this_node=true) | |
Create page content node (always use this method first when adding a new element) More... | |
getNewPageContentNode () | |
modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false) | |
Modify page content after xsl. More... | |
getModel () | |
Get model as needed for the front-end editor. More... | |
Static Public Member Functions | |
static | attribsToArray (string $a_str) |
converts a string of format var1 = "val1" var2 = "val2" ... More... | |
static | _input2xml (string $a_text, string $a_lang, bool $a_wysiwyg=false, bool $a_handle_lists=true) |
Converts user input to xml User input comes as bb code information, e.g. More... | |
static | intLinks2xml (string $a_text) |
internal links to xml More... | |
static | input2xmlReplaceLists (string $a_text) |
Converts xml from DB to output in edit textarea. More... | |
static | xml2outputReplaceLists (string $a_text) |
Replaces with *. More... | |
static | segmentString (string $a_haystack, array $a_needles) |
Segments a string into an array at each position of a substring. More... | |
static | xml2output (string $a_text, bool $a_wysiwyg=false, bool $a_replace_lists=true, bool $unmask=true) |
Converts xml from DB to output in edit textarea. More... | |
static | handleAjaxContent (string $a_content) |
Handle ajax content. More... | |
static | handleAjaxContentPost (string $text) |
Post input2xml handling of ajax content. More... | |
static | autoLinkGlossariesPage (ilPageObject $a_page, array $a_terms) |
Auto link glossary of whole page. More... | |
static | afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation) |
After page has been updated (or created) More... | |
static | beforePageDelete (ilPageObject $a_page) |
Before page is being deleted. More... | |
static | afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr) |
After page history entry has been created. More... | |
static | saveAnchors (ilPageObject $a_page, DOMDocument $a_domdoc) |
Save anchors. More... | |
static | _deleteAnchors (string $a_parent_type, int $a_page_id, string $a_page_lang) |
Delete anchors of a page. More... | |
static | _saveAnchor (string $a_parent_type, int $a_page_id, string $a_page_lang, string $a_anchor_name) |
Save an anchor. More... | |
static | _readAnchors (string $a_parent_type, int $a_page_id, string $a_page_lang="-") |
Read anchors of a page. More... | |
static | saveMetaKeywords (ilPageObject $a_page, DOMDocument $a_domdoc) |
save all keywords More... | |
![]() | |
static | sortHierIds (array $a_array) |
Sort an array of Hier IDS in ascending order. More... | |
static | isGreaterHierId (string $a, string $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, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0) |
Handle copied content. More... | |
static | afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation) |
After page has been updated (or created) More... | |
static | beforePageDelete (ilPageObject $a_page) |
Before page is being deleted. More... | |
static | afterRepositoryCopy (ilPageObject $page, array $mapping, int $source_ref_id) |
After repository (container) copy action. More... | |
static | afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr) |
After page history entry has been created. More... | |
static | deleteHistoryLowerEqualThan (string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr) |
Overwrite in derived classes, if old history entries are being deleted. More... | |
Protected Member Functions | |
createAfter (DomNode $node) | |
Create paragraph node (incl. More... | |
checkTextArray (array $text) | |
Check text array. More... | |
![]() | |
getPageManager () | |
setType (string $a_type) | |
Set Type. More... | |
hasNode () | |
createInitialChildNode (string $hier_id, string $pc_id, string $child, array $child_attributes=[]) | |
Static Protected Member Functions | |
static | getBBMap () |
Get bb to xml tag map. More... | |
static | getXMLTagMap () |
Get tag to bb map. More... | |
static | replaceBBCode (string $a_text, string $a_bb, string $a_tag) |
static | isValidTagContent (string $content) |
static | replaceBBTagByMatching (string $start_tag, string $end_tag, string $xml_tag_name, string $text, array $attribs) |
Transforms [iln...]...[] to <IntLink...>...</IntLink>, if content is valid, otherwise it removes the bb tags. More... | |
static | linkTermsInDom (DOMDocument $a_dom, array $a_terms, ?DOMNode $a_par_node=null) |
Link terms in a dom page object in bb style. More... | |
Protected Attributes | |
string | $inserted_pc_id |
ilObjUser | $user |
ilLanguage | $lng |
![]() | |
DOMDocument | $dom_doc |
ILIAS COPage InternalDomainService | $domain |
string | $pcid |
string | $type = "" |
ilPageObject | $pg_obj |
string | $file_download_link |
string | $fullscreen_link |
string | $sourcecode_download_script |
ilLogger | $log |
string | $profile_back_url = "" |
ILIAS COPage Dom DomUtil | $dom_util |
PageManagerInterface | $page_manager = null |
ObjectAdapterInterface | $object = null |
Static Protected Attributes | |
static array | $bb_tags |
Additional Inherited Members | |
![]() | |
string | $hier_id = "" |
DOMNode | $dom_node = null |
string | $page_lang = "" |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilPCParagraph
Paragraph of ilPageObject
Definition at line 26 of file class.ilPCParagraph.php.
|
static |
|
static |
Converts user input to xml User input comes as bb code information, e.g.
"Hello [str]world[/str]."
Definition at line 369 of file class.ilPCParagraph.php.
References ilPageContent\$log, ilLogger\debug(), ilLoggerFactory\getLogger(), input2xmlReplaceLists(), null, and ilUtil\stripSlashes().
Referenced by input2xml(), COPageTestBase\legacyHtmlToXml(), PCParagraphTest\test_input2xmlEmpty(), PCParagraphTest\test_input2xmlResult(), PCParagraphTest\test_input2xmlValidXml(), ilPCDataTableGUI\update(), ILIAS\COPage\PC\Table\TableCommandActionHandler\updateData(), and ilPCDataTableGUI\updateJS().
|
static |
Read anchors of a page.
Definition at line 1906 of file class.ilPCParagraph.php.
Referenced by ilInternalLinkGUI\showLinkHelp().
|
static |
|
static |
After page history entry has been created.
Definition at line 1831 of file class.ilPCParagraph.php.
|
static |
After page has been updated (or created)
Definition at line 1807 of file class.ilPCParagraph.php.
|
static |
converts a string of format var1 = "val1" var2 = "val2" ...
into an array
string | $a_str | string in format: var1 = "val1" var2 = "val2" ... |
Definition at line 55 of file class.ilPCParagraph.php.
Referenced by ilPCParagraphGUI\xml2outputJS().
ilPCParagraph::autoLinkGlossaries | ( | array | $a_glos | ) |
Definition at line 1626 of file class.ilPCParagraph.php.
References ilObject\_getAllReferences(), ilObject\_lookupType(), ilPageContent\getChildNode(), ilGlossaryTerm\getTermList(), and getText().
|
static |
Auto link glossary of whole page.
ilDateTimeException |
Definition at line 1795 of file class.ilPCParagraph.php.
References ilPageObject\buildDom(), ilPageObject\getDomDoc(), and ilPageObject\update().
Referenced by ilObjGlossary\autoLinkGlossaryTerms(), and ilObjContentObject\autoLinkGlossaryTerms().
ilPCParagraph::autoSplit | ( | string | $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 1168 of file class.ilPCParagraph.php.
References handleNextBr(), and removeTrailingBr().
Referenced by setText().
|
static |
Before page is being deleted.
Definition at line 1821 of file class.ilPCParagraph.php.
References ilPageObject\getId(), ilPageObject\getLanguage(), and ilPageObject\getParentType().
|
protected |
Check text array.
Definition at line 252 of file class.ilPCParagraph.php.
Referenced by setText().
ilPCParagraph::create | ( | ilPageObject | $a_pg_obj, |
string | $a_hier_id, | ||
string | $a_pc_id = "" , |
||
bool | $from_placeholder = false |
||
) |
Create paragraph node (incl.
page content node) at given hierarchical ID.
Definition at line 122 of file class.ilPCParagraph.php.
References ilPageContent\createPageContentNode(), ilPageContent\getDomNode(), IL_INSERT_AFTER, and ilPageObject\insertContent().
|
protected |
Create paragraph node (incl.
page content node) after given node.
Definition at line 103 of file class.ilPCParagraph.php.
References ilPageContent\getNewPageContentNode(), and ilPageContent\setDomNode().
ilPCParagraph::getAutoIndent | ( | ) |
Definition at line 297 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
|
staticprotected |
Get bb to xml tag map.
Definition at line 86 of file class.ilPCParagraph.php.
ilPCParagraph::getCharacteristic | ( | ) |
Definition at line 287 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
Referenced by getModel(), getType(), and setText().
ilPCParagraph::getDownloadTitle | ( | ) |
Definition at line 317 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::getJavascriptFiles | ( | string | $a_mode | ) |
Definition at line 1971 of file class.ilPCParagraph.php.
References ilLinkifyUtil\getLocalJsPaths().
ilPCParagraph::getLanguage | ( | ) |
Definition at line 341 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
Referenced by input2xml(), and setText().
ilPCParagraph::getLastSavedPCId | ( | ilPageObject | $a_pg_obj, |
bool | $a_as_ajax_str = false |
||
) |
Get last inserted pc ids.
Definition at line 1401 of file class.ilPCParagraph.php.
References ilPageContent\$hier_id, $inserted_pc_id, ilPageObject\addHierIDs(), ilPageObject\getHierIdsForPCIds(), and ilPageObject\stripHierIDs().
ilPCParagraph::getModel | ( | ) |
Definition at line 1993 of file class.ilPCParagraph.php.
References getCharacteristic(), getText(), and ilPCParagraphGUI\xml2outputJS().
ilPCParagraph::getOnloadCode | ( | string | $a_mode | ) |
Definition at line 1982 of file class.ilPCParagraph.php.
ilPCParagraph::getShowLineNumbers | ( | ) |
Definition at line 331 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::getSubCharacteristic | ( | ) |
Definition at line 307 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::getText | ( | bool | $a_short_mode = false | ) |
Get (xml) content of paragraph.
Definition at line 269 of file class.ilPCParagraph.php.
References $c, and ilPageContent\getChildNode().
Referenced by autoLinkGlossaries(), and getModel().
ilPCParagraph::getType | ( | ) |
Need to override getType from ilPageContent to distinguish between Pararagraph and Source.
Definition at line 1312 of file class.ilPCParagraph.php.
References getCharacteristic().
|
staticprotected |
Get tag to bb map.
Definition at line 94 of file class.ilPCParagraph.php.
|
static |
Handle ajax content.
Definition at line 1430 of file class.ilPCParagraph.php.
References $DIC, $id, $res, ilPageContentGUI\_getCommonBBButtons(), null, and ilUtil\stripSlashes().
Referenced by COPageTestBase\legacyHtmlToXml(), PCParagraphTest\testHandleAjaxContentLists(), PCParagraphTest\testHandleAjaxContentSpans(), ILIAS\COPage\PC\Table\TableCommandActionHandler\updateData(), and ilPCDataTableGUI\updateJS().
|
static |
Post input2xml handling of ajax content.
Definition at line 1568 of file class.ilPCParagraph.php.
Referenced by insert(), COPageTestBase\legacyHtmlToXml(), saveJS(), PCParagraphTest\testHandleAjaxContentPost(), ILIAS\COPage\PC\Table\TableCommandActionHandler\updateData(), and ilPCDataTableGUI\updateJS().
ilPCParagraph::handleNextBr | ( | string | $a_str | ) |
Remove preceding
Definition at line 1282 of file class.ilPCParagraph.php.
Referenced by autoSplit().
ilPCParagraph::init | ( | ) |
Definition at line 74 of file class.ilPCParagraph.php.
References $DIC, ILIAS\Repository\lng(), ilPageContent\setType(), and ILIAS\Repository\user().
ilPCParagraph::input2xml | ( | string | $a_text, |
bool | $a_wysiwyg = false , |
||
bool | $a_handle_lists = true |
||
) |
Definition at line 346 of file class.ilPCParagraph.php.
References _input2xml(), and getLanguage().
Referenced by ilPCSourceCode\importFile().
|
static |
Converts xml from DB to output in edit textarea.
string | $a_text | xml from db |
Definition at line 809 of file class.ilPCParagraph.php.
Referenced by _input2xml().
ilPCParagraph::insert | ( | \ilPageObject | $page, |
string | $a_content, | ||
string | $a_char, | ||
string | $a_pc_id, | ||
string | $a_insert_at = "" , |
||
string | $a_new_pc_id = "" |
||
) |
Save input coming from ajax.
Definition at line 2016 of file class.ilPCParagraph.php.
References $user, exit, ilPageObject\getContentObject(), ilPageContent\getPage(), handleAjaxContentPost(), and ilPageObject\setLanguage().
|
static |
internal links to xml
Definition at line 603 of file class.ilPCParagraph.php.
References $DIC, $user_id, and ilObjUser\_lookupId().
|
staticprotected |
Definition at line 513 of file class.ilPCParagraph.php.
|
staticprotected |
Link terms in a dom page object in bb style.
Definition at line 1660 of file class.ilPCParagraph.php.
References Vendor\Package\$a, Vendor\Package\$b, $DIC, null, ilArrayUtil\sortArray(), ilStr\strIPos(), ilStr\strLen(), ilStr\strPos(), and ilStr\subStr().
ilPCParagraph::removeTrailingBr | ( | string | $a_str | ) |
Remove trailing
Definition at line 1301 of file class.ilPCParagraph.php.
Referenced by autoSplit().
|
staticprotected |
Definition at line 354 of file class.ilPCParagraph.php.
|
staticprotected |
Transforms [iln...]...[] to <IntLink...>...</IntLink>, if content is valid, otherwise it removes the bb tags.
string | $start_tag | e.g. [iln page="30"] |
Definition at line 526 of file class.ilPCParagraph.php.
References null.
|
static |
Save anchors.
Definition at line 1842 of file class.ilPCParagraph.php.
References ilPageObject\getId(), ilPageObject\getLanguage(), and ilPageObject\getParentType().
ilPCParagraph::saveJS | ( | ilPageObject | $a_pg_obj, |
string | $a_content, | ||
string | $a_char, | ||
string | $a_pc_id, | ||
string | $a_insert_at = "" , |
||
bool | $from_placeholder = false |
||
) |
Save input coming from ajax.
Definition at line 1329 of file class.ilPCParagraph.php.
References $lang, $user, exit, ilPageObject\getContentObject(), ilPageContent\getPage(), handleAjaxContentPost(), and ILIAS\Repository\lng().
|
static |
save all keywords
Definition at line 1935 of file class.ilPCParagraph.php.
References $DIC, ilPageObject\getId(), ilPageObject\getParentId(), and ilPageObject\getParentType().
|
static |
Segments a string into an array at each position of a substring.
Definition at line 950 of file class.ilPCParagraph.php.
Referenced by xml2outputReplaceLists().
ilPCParagraph::setAutoIndent | ( | string | $ind | ) |
Definition at line 302 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setCharacteristic | ( | string | $a_char | ) |
Definition at line 282 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setDownloadTitle | ( | string | $title | ) |
Definition at line 312 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setLanguage | ( | string | $a_lang | ) |
Definition at line 336 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setShowLineNumbers | ( | string | $a_char | ) |
Definition at line 322 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setSubCharacteristic | ( | string | $a_char | ) |
Definition at line 292 of file class.ilPCParagraph.php.
References ilPageContent\getChildNode().
ilPCParagraph::setText | ( | string | $a_text, |
bool | $a_auto_split = false |
||
) |
Set (xml) content of text paragraph.
string | $a_text | text content |
bool | $a_auto_split | auto split paragraph at headlines true/false |
Definition at line 152 of file class.ilPCParagraph.php.
References $check, $path, autoSplit(), checkTextArray(), getCharacteristic(), ilPageContent\getChildNode(), ilPageContent\getDomNode(), getLanguage(), and ilPageContent\getPage().
Referenced by ilPCSourceCode\importFile().
ilPCParagraph::updatePage | ( | ilPageObject | $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)
ilDateTimeException |
Definition at line 1620 of file class.ilPCParagraph.php.
References ilPageObject\beforePageContentUpdate(), and ilPageObject\update().
|
static |
Converts xml from DB to output in edit textarea.
string | $a_text | xml from db |
Definition at line 990 of file class.ilPCParagraph.php.
References ilObjUser\_lookupLogin(), ilObject\_lookupType(), and xml2outputReplaceLists().
Referenced by ilPCDataTableGUI\getCellContent(), ILIAS\components\ILIAS\Glossary\Table\TermListTable\getDataRetrieval(), ilPCTable\getModel(), ilPCParagraphModelProvider\getModels(), ILIAS\COPage\Compare\PageCompare\getPageContentsHashes(), and ilPresentationTableGUI\getShortTextForTerm().
|
static |
Replaces
with *.
string | $a_text | xml from db |
Definition at line 875 of file class.ilPCParagraph.php.
References segmentString().
Referenced by xml2output().
|
staticprotected |
Definition at line 32 of file class.ilPCParagraph.php.
|
protected |
Definition at line 28 of file class.ilPCParagraph.php.
Referenced by getLastSavedPCId().
|
protected |
Definition at line 30 of file class.ilPCParagraph.php.
|
protected |
Definition at line 29 of file class.ilPCParagraph.php.