19declare(strict_types=1);
30 public function __construct(
int $a_id = 0,
int $a_old_nr = 0,
protected bool $isEmbeddedMode =
false,
string $language =
'')
39 if ($this->isEmbeddedMode) {
43 return parent::getProfileBackUrl();
48 parent::setDefaultLinkXml();
50 if ($this->isEmbeddedMode) {
54 $linkXml = str_replace(
'<LinkTargets></LinkTargets>',
'', $linkXml);
56 $domDoc =
new DOMDocument();
57 $domDoc->loadXML(
'<?xml version="1.0" encoding="UTF-8"?>' . $linkXml);
59 $xpath =
new DOMXPath($domDoc);
60 $links = $xpath->query(
'//IntLinkInfos/IntLinkInfo');
62 if ($links->length > 0) {
63 foreach ($links as
$link) {
65 $link->attributes->getNamedItem(
'LinkTarget')->nodeValue =
'_blank';
69 $linkXmlWithBlankTargets = $domDoc->saveXML();
71 $this->
setLinkXml(str_replace(
'<?xml version="1.0" encoding="UTF-8"?>',
'', $linkXmlWithBlankTargets));
72 }
catch (Throwable
$e) {
73 $this->log->error(sprintf(
74 'Could not manipulate page editor link XML: %s / Error Message: %s',
84 $this->
ctrl->redirectByClass(ilObjContentPageGUI::class,
'view');
89 $this->
ctrl->setParameterByClass(ilObjContentPageGUI::class, self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT,
'1');
92 $this->
ui->factory()->link()->standard(
93 $this->
lng->txt(
'obj_sty'),
94 $this->ctrl->getLinkTargetByClass([
95 ilRepositoryGUI::class,
96 ilObjContentPageGUI::class
97 ], self::UI_CMD_STYLES_EDIT)
101 $this->
ctrl->setParameterByClass(ilObjContentPageGUI::class, self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT,
null);
@ilCtrl_Calls ilContentPagePageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI @ilCtrl_Calls ...
__construct(int $a_id=0, int $a_old_nr=0, protected bool $isEmbeddedMode=false, string $language='')
getAdditionalPageActions()
Get additional page actions.
ILIAS COPage Link LinkManager $link
setTemplateOutput(bool $a_output=true)
setTemplateTargetVar(string $a_variable)
Interface ilContentPageObjectConstants.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc