19declare(strict_types=1);
41 if ($this->isEmbeddedMode) {
45 return parent::getProfileBackUrl();
50 parent::setDefaultLinkXml();
52 if ($this->isEmbeddedMode) {
56 $linkXml = str_replace(
'<LinkTargets></LinkTargets>',
'', $linkXml);
58 $domDoc =
new DOMDocument();
59 $domDoc->loadXML(
'<?xml version="1.0" encoding="UTF-8"?>' . $linkXml);
61 $xpath =
new DOMXPath($domDoc);
62 $links = $xpath->query(
'//IntLinkInfos/IntLinkInfo');
64 if ($links->length > 0) {
65 foreach ($links as $link) {
67 $link->attributes->getNamedItem(
'LinkTarget')->nodeValue =
'_blank';
71 $linkXmlWithBlankTargets = $domDoc->saveXML();
73 $this->
setLinkXml(str_replace(
'<?xml version="1.0" encoding="UTF-8"?>',
'', $linkXmlWithBlankTargets));
74 }
catch (Throwable
$e) {
75 $this->log->error(sprintf(
76 'Could not manipulate page editor link XML: %s / Error Message: %s',
86 $this->
ctrl->redirectByClass(ilObjContentPageGUI::class,
'view');
91 $this->
ctrl->setParameterByClass(ilObjContentPageGUI::class,
'page_editor_style',
'1');
94 $this->
ui->factory()->link()->standard(
95 $this->
lng->txt(
'obj_sty'),
96 $this->ctrl->getLinkTargetByClass([
97 ilRepositoryGUI::class,
98 ilObjContentPageGUI::class
99 ], self::UI_CMD_STYLES_EDIT)
103 $this->
ctrl->setParameterByClass(ilObjContentPageGUI::class,
'page_editor_style',
null);
@ilCtrl_Calls ilContentPagePageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI @ilCtrl_Calls ...
__construct(int $a_id=0, int $a_old_nr=0, bool $isEmbeddedMode=false, string $language='')
getAdditionalPageActions()
Get additional page actions.
setTemplateOutput(bool $a_output=true)
setTemplateTargetVar(string $a_variable)
Interface ilContentPageObjectConstants.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc