58        $this->
ui = $DIC->ui();
 
   59        $this->lng = 
$DIC->language();
 
   61        $this->
user = $DIC->user();
 
   62        $this->ctrl = 
$DIC->ctrl();
 
   63        $this->plugin_admin = 
$DIC[
"ilPluginAdmin"];
 
   75        switch (
$query[
"action"]) {
 
   79            case "component.edit.form":
 
   94        $f = $this->
ui->factory();
 
   95        $dd = 
$f->dropdown()->standard([
 
   96            $f->link()->standard(
"label", 
"#")
 
   98        $r = $this->
ui->renderer();
 
  100        $o->dropdown = $r->render($dd);
 
  117        $o->backUrl = 
$ctrl->getLinkTarget($this->page_gui, 
"edit");
 
  119            count($this->
user->getPCClipboardContent()) > 0;
 
  135            "./Services/COPage/css/tiny_extra.css";
 
  137        $config->text_block_formats = [];
 
  138        foreach ([
"text_block", 
"heading1", 
"heading2", 
"heading3"] as 
$type) {
 
  139            $dummy_pc = new \ilPCParagraphGUI($this->page_gui->getPageObject(), 
null, 
"");
 
  140            $dummy_pc->setStyleId($this->page_gui->getStyleId());
 
  141            $dummy_pc->getCharacteristicsOfCurrentStyle(
$type);
 
  142            foreach ($dummy_pc->getCharacteristics() as $char => 
$txt) {
 
  146        $config->editPlaceholders = $this->page_gui->getPageConfig()->getEnablePCType(
"PlaceHolder");
 
  163        $config = $this->page_gui->getPageConfig();
 
  164        foreach (
$config->getEnabledTopPCTypes() as $def) {
 
  165            $commands[$def[
"pc_type"]] = 
$lng->txt(
"cont_ed_insert_" . $def[
"pc_type"]);
 
  169        if (count($this->page_gui->getPageObject()->getContentTemplates()) > 0) {
 
  170            $commands[
"templ"] = 
$lng->txt(
"cont_ed_insert_templ");
 
  174        $pl_names = $this->plugin_admin->getActivePluginsForSlot(
 
  179        foreach ($pl_names as $pl_name) {
 
  180            $plugin = $this->plugin_admin->getPluginObject(
 
  186            $commands[
"plug_" . 
$plugin->getPluginName()] =
 
  200        $lng->loadLanguageModule(
"content");
 
  201        $tpl = new \ilTemplate(
"tpl.page_edit_help.html", 
true, 
true, 
"Services/COPage/Editor");
 
  202        $tpl->setCurrentBlock(
"help");
 
  203        $tpl->setVariable(
"TXT_ADD_EL", 
$lng->txt(
"cont_add_elements"));
 
  206        $tpl->setVariable(
"TXT_DRAG", 
$lng->txt(
"cont_drag_and_drop_elements"));
 
  207        $tpl->setVariable(
"TXT_EDIT", 
$lng->txt(
"cont_click_edit"));
 
  208        $tpl->setVariable(
"TXT_SEL", 
$lng->txt(
"cont_shift_click_to_select"));
 
  209        $tpl->parseCurrentBlock();
 
  221        $lng->loadLanguageModule(
"content");
 
  222        $tpl = new \ilTemplate(
"tpl.page_edit_help.html", 
true, 
true, 
"Services/COPage/Editor");
 
  223        $tpl->setCurrentBlock(
"multi-help");
 
  224        $tpl->setVariable(
"TXT_SEL", 
$lng->txt(
"cont_click_multi_select"));
 
  225        $tpl->parseCurrentBlock();
 
  240        $lng->loadLanguageModule(
"content");
 
  241        $tpl = new \ilTemplate(
"tpl.top_actions.html", 
true, 
true, 
"Services/COPage/Editor");
 
  244        $tpl->setVariable(
"DROPDOWN", 
$ui->renderer()->renderAsync($dd));
 
  246        if ($this->page_gui->getPageObject()->getEffectiveEditLockTime() > 0) {
 
  247            $mess = $this->page_gui->getBlockingInfoMessage();
 
  248            $tpl->setVariable(
"MESSAGE", $mess);
 
  249            $b = 
$ui->factory()->button()->standard(
 
  250                $lng->txt(
"cont_finish_editing"),
 
  251                $ctrl->getLinkTarget($this->page_gui, 
"releasePageLock")
 
  254            $b = 
$ui->factory()->button()->standard(
 
  255                $lng->txt(
"cont_finish_editing"),
 
  256                $ctrl->getLinkTarget($this->page_gui, 
"finishEditing")
 
  260        $tpl->setVariable(
"QUIT_BUTTON", 
$ui->renderer()->renderAsync(
$b));
 
  262        $html = $this->ui_wrapper->getRenderedViewControl(
 
  264                [
"Page", 
"switch.single", 
$lng->txt(
"cont_edit_comp")],
 
  265                [
"Page", 
"switch.multi", 
$lng->txt(
"cont_edit_multi")]
 
  268        $tpl->setVariable(
"SWITCH", $html);
 
  281        $config = $this->page_gui->getPageConfig();
 
  282        $page = $this->page_gui->getPageObject();
 
  287        $sel_media_mode = (
$user->getPref(
"ilPageEditor_MediaMode") != 
"disable");
 
  288        $sel_html_mode = (
$user->getPref(
"ilPageEditor_HTMLMode") != 
"disable");
 
  294        if (
$config->getEnableActivation()) {
 
  295            $captions = $this->page_gui->getActivationCaptions();
 
  297            if ($page->getActive()) {
 
  298                $items[] = 
$ui->factory()->link()->standard(
 
  299                    $captions[
"deactivatePage"],
 
  300                    $ctrl->getLinkTarget($this->page_gui, 
"deactivatePage")
 
  303                $items[] = 
$ui->factory()->link()->standard(
 
  304                    $captions[
"activatePage"],
 
  305                    $ctrl->getLinkTarget($this->page_gui, 
"activatePage")
 
  311        if (
$config->getUseAttachedContent()) {
 
  312            $items[] = 
$ui->factory()->link()->standard(
 
  313                $lng->txt(
"cont_initial_attached_content"),
 
  314                $ctrl->getLinkTarget($this->page_gui, 
"initialOpenedContent")
 
  323        $lng->loadLanguageModule(
"content");
 
  326        if ($sel_media_mode) {
 
  327            $ctrl->setParameter($this->page_gui, 
"media_mode", 
"disable");
 
  328            $items[] = 
$ui->factory()->link()->standard(
 
  329                $lng->txt(
"cont_deactivate_media"),
 
  330                $ctrl->getLinkTarget($this->page_gui, 
"setEditMode")
 
  333            $ctrl->setParameter($this->page_gui, 
"media_mode", 
"enable");
 
  334            $items[] = 
$ui->factory()->link()->standard(
 
  335                $lng->txt(
"cont_activate_media"),
 
  336                $ctrl->getLinkTarget($this->page_gui, 
"setEditMode")
 
  339        $ctrl->setParameter($this, 
"media_mode", 
"");
 
  342        if (!
$config->getPreventHTMLUnmasking()) {
 
  343            if ($sel_html_mode) {
 
  344                $ctrl->setParameter($this->page_gui, 
"html_mode", 
"disable");
 
  345                $items[] = 
$ui->factory()->link()->standard(
 
  346                    $lng->txt(
"cont_deactivate_html"),
 
  347                    $ctrl->getLinkTarget($this->page_gui, 
"setEditMode")
 
  350                $ctrl->setParameter($this->page_gui, 
"html_mode", 
"enable");
 
  351                $items[] = 
$ui->factory()->link()->standard(
 
  352                    $lng->txt(
"cont_activate_html"),
 
  353                    $ctrl->getLinkTarget($this->page_gui, 
"setEditMode")
 
  357        $ctrl->setParameter($this->page_gui, 
"html_mode", 
"");
 
  359        $lm_set = new \ilSetting(
"lm");
 
  360        if ($this->page_gui->getEnableEditing() && $this->user->getId() != 
ANONYMOUS_USER_ID) {
 
  363            if (
$lm_set->get(
"page_history", 1)) {
 
  364                $items[] = 
$ui->factory()->link()->standard(
 
  365                    $lng->txt(
"history"),
 
  366                    $ctrl->getLinkTarget($this->page_gui, 
"history")
 
  370            if (
$config->getEnableScheduledActivation()) {
 
  371                $items[] = 
$ui->factory()->link()->standard(
 
  372                    $lng->txt(
"cont_activation"),
 
  373                    $ctrl->getLinkTarget($this->page_gui, 
"editActivation")
 
  378            $items[] = 
$ui->factory()->link()->standard(
 
  379                $lng->txt(
"clipboard"),
 
  380                $ctrl->getLinkTargetByClass([get_class($this->page_gui), 
"ilEditClipboardGUI"], 
"view")
 
  386        foreach ($this->page_gui->getAdditionalPageActions() as $item) {
 
  390        return $ui->factory()->dropdown()->standard($items);
 
  401        $config = $this->page_gui->getPageConfig();
 
  402        $page = $this->page_gui->getPageObject();
 
  411        if (
$config->getMultiLangSupport()) {
 
  414            if ($ot->getContentActivated()) {
 
  415                $lng->loadLanguageModule(
"meta");
 
  417                if ($page->getLanguage() != 
"-") {
 
  418                    $l = $ot->getMasterLanguage();
 
  419                    $items[] = 
$ui->factory()->link()->standard(
 
  420                        $lng->txt(
"cont_edit_language_version") . 
": " .
 
  421                        $lng->txt(
"meta_l_" . $l),
 
  422                        $ctrl->getLinkTarget($this->page_gui, 
"editMasterLanguage")
 
  426                foreach ($ot->getLanguages() as $al => 
$lang) {
 
  427                    if ($page->getLanguage() != $al &&
 
  428                        $al != $ot->getMasterLanguage()) {
 
  429                        $ctrl->setParameter($this->page_gui, 
"totransl", $al);
 
  430                        $items[] = 
$ui->factory()->link()->standard(
 
  431                            $lng->txt(
"cont_edit_language_version") . 
": " .
 
  432                            $lng->txt(
"meta_l_" . $al),
 
  433                            $ctrl->getLinkTarget($this->page_gui, 
"switchToLanguage")
 
  435                        $ctrl->setParameter($this->page_gui, 
"totransl", 
$_GET[
"totransl"]);
 
  448        $config = $this->page_gui->getPageConfig();
 
  449        $page = $this->page_gui->getPageObject();
 
  454        if (
$config->getMultiLangSupport()) {
 
  457            if ($ot->getContentActivated()) {
 
  458                $lng->loadLanguageModule(
"meta");
 
  460                $ml_gui = new \ilPageMultiLangGUI(
 
  461                    $page->getParentType(),
 
  464                $info = $ml_gui->getMultiLangInfo($page->getLanguage());
 
  465                $info = 
$ui->renderer()->renderAsync(
$ui->factory()->messageBox()->info($info));
 
  486                "all" => 
"select_all",
 
  487                "none" => 
"cont_select_none",
 
  490                "activate" => 
"cont_ed_enable",
 
  491                "characteristic" => 
"cont_assign_characteristic" 
  495        return $this->ui_wrapper->getRenderedButtonGroups($groups);
 
  506        $html = $this->ui_wrapper->getRenderedInfoBox(
$lng->txt(
"cont_sel_el_use_paste"));
 
  517        $html = $this->ui_wrapper->getRenderedFailureBox();
 
  527        $html = $this->ui_wrapper->getRenderedModalFailureBox();
 
  539        $tpl = new \ilTemplate(
"tpl.format_selection.html", 
true, 
true, 
"Services/COPage/Editor");
 
  540        $tpl->setVariable(
"TXT_PAR", 
$lng->txt(
"cont_choose_characteristic_text"));
 
  541        $tpl->setVariable(
"TXT_SECTION", 
$lng->txt(
"cont_choose_characteristic_section"));
 
  542        $tpl->setVariable(
"TXT_MEDIA", 
$lng->txt(
"cont_media"));
 
  545        $tpl->setVariable(
"PAR_SELECTOR", 
$ui->renderer()->renderAsync($par_sel->getStyleSelector(
"", 
"format", 
"format.paragraph", 
"format")));
 
  548        $tpl->setVariable(
"SEC_SELECTOR", 
$ui->renderer()->renderAsync($sec_sel->getStyleSelector(
"", 
"format", 
"format.section", 
"format")));
 
  551        $tpl->setVariable(
"MEDIA_SELECTOR", 
$ui->renderer()->renderAsync($med_sel->getStyleSelector(
"", 
"format", 
"format.media", 
"format")));
 
  555            $this->ui_wrapper->getRenderedButton(
 
  563            $this->ui_wrapper->getRenderedButton(
 
  580        return $this->page_gui->getPageObject()->getPCModel();
 
  591        if (!is_null($pc_edit)) {
 
  592            $form = $pc_edit->getEditComponentForm(
 
  594                $this->page_gui->getPageObject()->getParentType(),
 
  596                (
int) $this->page_gui->getStyleId(),
 
  600        $o = new \stdClass();
 
  601        $o->editForm = $form;
 
  615            if (!is_null($pc_edit)) {
 
  616                $ui[$def[
"name"]] = $pc_edit->getEditorElements(
 
  618                    $this->page_gui->getPageObject()->getParentType(),
 
  620                    (
int) $this->page_gui->getStyleId()
 
  635            $pcdef[
"types"][$def[
"name"]] = $def[
"pc_type"];
 
  636            $pcdef[
"names"][$def[
"pc_type"]] = $def[
"name"];
 
  637            $pcdef[
"txt"][$def[
"pc_type"]] = $this->lng->txt(
"cont_" . 
"pc_" . $def[
"pc_type"]);
 
  648        $modal = 
$ui->factory()->modal()->roundtrip(
'#title#', 
$ui->factory()->legacy(
'#content#'))
 
  649                    ->withActionButtons([
 
  650                        $ui->factory()->button()->standard(
'#button_title#', 
'#'),
 
  652        $modalt[
"signal"] = $modal->getShowSignal()->getId();
 
  653        $modalt[
"template"] = 
$ui->renderer()->renderAsync($modal);
 
  665        $confirmation = 
$ui->factory()->messageBox()->confirmation(
"#text#");
 
  667        return $ui->renderer()->renderAsync($confirmation);
 
  676        $aset = new \ilSetting(
"adve");
 
  677        return (
int) $aset->get(
"autosave");
 
An exception for terminatinating execution or to throw for unit testing.
getActionsDropDown()
Add actions menu.
getErrorModalMessage()
error message in modal
getTopActions()
Get page help (drag drop explanation)
getPageEditHelp()
Get page help (drag drop explanation)
getMultiEditHelp()
Get page help (drag drop explanation)
getAutoSaveInterval()
Get auto save intervall.
getComponentsEditorUI()
Get components ui elements.
getPCModel()
Get page component model.
getMultiLangActions()
Add multi-language actions to menu.
getModalTemplate()
Get modal template.
getFormatSelection()
Format selection.
getConfirmationTemplate()
Get confirmation template.
componentEditFormResponse($query)
getMultiActions()
Get multi actions.
__construct(\ilPageObjectGUI $page_gui)
getPasteMessage()
Confirmation screen for cut/paste step.
getAddCommands()
Get add commands.
getErrorMessage()
Confirmation screen for cut/paste step.
getComponentsDefinitions()
Get components ui elements.
static getPCDefinitions()
Get PC definitions.
static getPCEditorInstanceByName($a_name)
Get instance.
static get($a_glyph, $a_text="")
Get glyph html.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static getInstance($a_obj_id)
Get instance.
static _getTextCharacteristics($a_style_id, $a_include_core=false)
Get text characteristics.
static _doJSEditing()
checks if current user has activated js editing and if browser is js capable
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Query action handler interface.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl