19 declare(strict_types=1);
    58     public function __construct(
int $a_id = 0, 
int $a_id_type = self::REPOSITORY_NODE_ID, 
int $a_parent_node_id = 0)
    65         $this->
http = $this->dic->http();
    66         $this->
settings = $this->dic->settings();
    67         $this->navHistory = $this->dic[
'ilNavigationHistory'];
    68         $this->
help = $DIC[
'ilHelp'];
    69         $this->uiServices = $DIC->ui();
    70         $this->lom_services = $DIC->learningObjectMetadata();
    72         $this->
lng->loadLanguageModule(
'copa');
    73         $this->
lng->loadLanguageModule(
'style');
    74         $this->
lng->loadLanguageModule(
'content');
    75         $this->
lng->loadLanguageModule(
'rep');
    89         $cs = $DIC->contentStyle();
    90         $this->content_style_gui = $cs->gui();
    91         if (is_object($this->
object)) {
    92             $this->content_style_domain = $cs->domain()->styleForRefId($this->
object->getRefId());
    95         $this->in_page_editor_style_context = $this->
http->wrapper()->query()->has(
    96             self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
    98         $this->
ctrl->saveParameterByClass(
    99             ilObjectContentStyleSettingsGUI::class,
   100             self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
   104     public static function _goto(
string $target): void
   107         $main_tpl = $DIC->ui()->mainTemplate();
   109         $targetAttributes = explode(
'_', $target);
   113             $DIC[
'ilErr']->raiseError($DIC->language()->txt(
'msg_no_perm_read'), $DIC[
'ilErr']->FATAL);
   116         if ($DIC->access()->checkAccess(
'read', 
'', 
$refId)) {
   117             $DIC->ctrl()->setTargetScript(
'ilias.php');
   118             $DIC->ctrl()->setParameterByClass(self::class, 
'ref_id', 
$refId);
   119             $DIC->ctrl()->redirectByClass([
   120                 ilRepositoryGUI::class,
   122             ], self::UI_CMD_VIEW);
   123         } elseif ($DIC->access()->checkAccess(
'visible', 
'', 
$refId)) {
   125         } elseif ($DIC->access()->checkAccess(
'read', 
'', 
ROOT_FOLDER_ID)) {
   126             $main_tpl->setOnScreenMessage(
   129                     $DIC->language()->txt(
'msg_no_perm_read_item'),
   135             $DIC->ctrl()->setTargetScript(
'ilias.php');
   136             $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 
'ref_id', 
ROOT_FOLDER_ID);
   137             $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
   140         $DIC[
'ilErr']->raiseError($DIC->language()->txt(
'msg_no_perm_read'), $DIC[
'ilErr']->FATAL);
   145         return self::OBJ_TYPE;
   150         if ($this->in_page_editor_style_context) {
   154         $this->
help->setScreenIdComponent($this->
object->getType());
   157             $this->tabs_gui->addTab(
   158                 self::UI_TAB_ID_CONTENT,
   159                 $this->
lng->txt(
'content'),
   160                 $this->
ctrl->getLinkTarget($this, self::UI_CMD_VIEW)
   165             $this->tabs_gui->addTab(
   166                 self::UI_TAB_ID_INFO,
   167                 $this->
lng->txt(
'info_short'),
   168                 $this->
ctrl->getLinkTargetByClass(ilInfoScreenGUI::class, 
'showSummary')
   173             $this->tabs_gui->addTab(
   174                 self::UI_TAB_ID_SETTINGS,
   175                 $this->
lng->txt(
'settings'),
   176                 $this->
ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
   181             $this->tabs_gui->addTab(
   183                 $this->
lng->txt(
'learning_progress'),
   184                 $this->
ctrl->getLinkTargetByClass(ilLearningProgressGUI::class)
   189             $this->tabs_gui->addTab(
   191                 $this->
lng->txt(
'meta_data'),
   192                 $this->
ctrl->getLinkTargetByClass(ilMDEditorGUI::class)
   197             $this->tabs_gui->addTab(
   198                 self::UI_TAB_ID_EXPORT,
   199                 $this->
lng->txt(
'export'),
   200                 $this->
ctrl->getLinkTargetByClass(ilExportGUI::class)
   205             $this->tabs_gui->addTab(
   206                 self::UI_TAB_ID_PERMISSIONS,
   207                 $this->
lng->txt(
'perm_settings'),
   208                 $this->
ctrl->getLinkTargetByClass(ilPermissionGUI::class, 
'perm')
   215         $nextClass = $this->
ctrl->getNextClass($this) ?? 
'';
   216         $cmd = $this->
ctrl->getCmd(self::UI_CMD_VIEW) ?? 
'';
   220         if (!$this->in_page_editor_style_context &&
   221             strtolower($nextClass) !== strtolower(ilObjectContentStyleSettingsGUI::class) &&
   222             (strtolower($cmd) !== strtolower(self::UI_CMD_EDIT) || strtolower($nextClass) !== strtolower(
   223                 ilContentPagePageGUI::class
   228         switch (strtolower($nextClass)) {
   229             case strtolower(ilObjectTranslationGUI::class):
   233                 $this->tabs_gui->activateTab(self::UI_TAB_ID_SETTINGS);
   237                 $this->
ctrl->forwardCommand($transgui);
   240             case strtolower(ilObjectContentStyleSettingsGUI::class):
   244                 if ($this->in_page_editor_style_context) {
   245                     $this->tabs_gui->setBackTarget(
   246                         $this->
lng->txt(
'back'),
   250                     $this->tabs_gui->activateTab(self::UI_TAB_ID_SETTINGS);
   254                 $settings_gui = $this->content_style_gui
   255                     ->objectSettingsGUIForRefId(
   259                 $this->
ctrl->forwardCommand($settings_gui);
   262             case strtolower(ilContentPagePageGUI::class):
   263                 $isMediaRequest = in_array(
   266                     self::UI_CMD_COPAGE_DOWNLOAD_FILE,
   267                     self::UI_CMD_COPAGE_DISPLAY_FULLSCREEN,
   268                     self::UI_CMD_COPAGE_DISPLAY_MEDIA,
   269                     self::UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH,
   273                 if ($isMediaRequest) {
   275                         $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->MESSAGE);
   278                     $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->MESSAGE);
   283                 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
   284                 $this->tpl->setCurrentBlock(
'SyntaxStyle');
   286                 $this->tpl->parseCurrentBlock();
   298                     $this->content_style_domain
   300                 $forwarder->setIsMediaRequest($isMediaRequest);
   303                     $this->pageMetricsService->store(
   306                             $event->
page()->getLanguage()
   311                 $pageContent = $forwarder->forward();
   312                 if ($pageContent !== 
'') {
   313                     $this->tpl->setContent($pageContent);
   317             case strtolower(ilInfoScreenGUI::class):
   318                 if (!$this->infoScreenEnabled) {
   326             case strtolower(ilCommonActionDispatcherGUI::class):
   331             case strtolower(ilPermissionGUI::class):
   335                 $this->tabs_gui->activateTab(self::UI_TAB_ID_PERMISSIONS);
   340             case strtolower(ilMDEditorGUI::class):
   344                 $this->tabs_gui->activateTab(self::UI_TAB_ID_MD);
   347                 $md_gui->
addObserver($this->
object, 
'MDUpdateListener', 
'General');
   348                 $this->
ctrl->forwardCommand($md_gui);
   351             case strtolower(ilLearningProgressGUI::class):
   353                     $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->MESSAGE);
   357                 $this->tabs_gui->activateTab(self::UI_TAB_ID_LP);
   360                 if ($this->
http->wrapper()->query()->has(
'user_id')) {
   361                     $usr_id = $this->
http->wrapper()->query()->retrieve(
   367                 $this->
ctrl->forwardCommand(
   370                         $this->
object->getRefId(),
   371                         $usr_id === 0 ? $this->
user->getId() : $usr_id
   376             case strtolower(ilExportGUI::class):
   380                 $this->tabs_gui->activateTab(self::UI_TAB_ID_EXPORT);
   383                 $this->
ctrl->forwardCommand($gui);
   386             case strtolower(ilObjectCopyGUI::class):
   387                 $this->tpl->loadStandardTemplate();
   390                 $gui->setType(self::OBJ_TYPE);
   392                 $this->
ctrl->forwardCommand($gui);
   396                 $settingsCommands = 
array_map(
'strtolower', [self::UI_CMD_EDIT, self::UI_CMD_UPDATE]);
   398                     case in_array(strtolower($cmd), $settingsCommands, 
true):
   403                 parent::executeCommand();
   420             $this->navHistory->addItem(
   421                 $this->
object->getRefId(),
   422                 ilLink::_getLink($this->
object->getRefId(), $this->
object->getType()),
   437         if (!$this->infoScreenEnabled) {
   442             $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->MESSAGE);
   445         if (strtolower($this->
ctrl->getCmd() ?? 
'') === 
'infoscreen') {
   446             $this->
ctrl->redirectByClass(ilInfoScreenGUI::class, 
'showSummary');
   449         $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
   452         $info->enableLearningProgress();
   453         $info->enablePrivateNotes();
   454         $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
   456         $this->
ctrl->forwardCommand($info);
   462             $this->tabs_gui->addSubTab(
   463                 self::UI_TAB_ID_SETTINGS,
   464                 $this->
lng->txt(
'general'),
   465                 $this->
ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
   468             $this->tabs_gui->addSubTab(
   469                 self::UI_TAB_ID_STYLE,
   470                 $this->
lng->txt(
'cont_style'),
   471                 $this->
ctrl->getLinkTargetByClass(
"ilobjectcontentstylesettingsgui", 
"")
   474             $this->tabs_gui->addSubTab(
   475                 self::UI_TAB_ID_I18N,
   476                 $this->
lng->txt(
'obj_multilinguality'),
   477                 $this->
ctrl->getLinkTargetByClass(ilObjectTranslationGUI::class)
   480             $this->tabs_gui->activateSubTab($activeTab);
   486         if ($this->
object instanceof 
ilObject) {
   488                 $this->
object->getTitle(),
   489                 $this->
ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
   491                 $this->
object->getRefId()
   507         $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
   509         $this->tpl->setPermanentLink($this->
object->getType(), $this->
object->getRefId(), 
'', 
'_top');
   517             $this->
lng->loadLanguageModule(
'cntr');
   519                 $this->uiServices->factory()->button()->primary(
   520                     $this->
lng->txt(
'cntr_text_media_editor'),
   521                     $this->
ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 
'edit')
   534             $this->
object->trackProgress($this->
user->getId());
   546                 $this->content_style_domain
   550             return $forwarder->forward($ctrlLink);
   558         $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
   559         $this->tpl->setCurrentBlock(
'SyntaxStyle');
   561         $this->tpl->parseCurrentBlock();
   566         $new_object->getObjectTranslation()->addLanguage(
   567             $this->
lng->getDefaultLanguage(),
   573         $new_object->getObjectTranslation()->save();
   575         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'object_added'), 
true);
   576         $this->
ctrl->redirect($this, 
'edit');
   581         parent::setTitleAndDescription();
   584         $this->tpl->setTitleIcon($icon, $this->
lng->txt(
'obj_' . $this->object->getType()));
   592         $presentationHeader->setTitle($this->
lng->txt(
'settings_presentation_header'));
   593         $a_form->
addItem($presentationHeader);
   595         $this->object_service->commonSettings()->legacyForm($a_form, $this->
object)->addIcon();
   596         $this->object_service->commonSettings()->legacyForm($a_form, $this->
object)->addTileImage();
   599         $sh->setTitle($this->
lng->txt(
'obj_features'));
   610         if ($this->
getCreationMode() !== 
true && count($this->
object->getObjectTranslation()->getLanguages()) > 1) {
   612             foreach ($this->lom_services->dataHelper()->getAllLanguages() as $lom_lang) {
   613                 if ($lom_lang->value() === $this->
object->getObjectTranslation()->getDefaultLanguage()) {
   614                     $language = $lom_lang->presentableLabel();
   622                                $this->
lng->txt(
'language'),
   633         $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
   637         $online->setInfo($this->
lng->txt(
'copa_activation_online_info'));
   643         if (count($this->
object->getObjectTranslation()->getLanguages()) > 1) {
   644             $a_values[
'title'] = $this->
object->getObjectTranslation()->getDefaultTitle();
   645             $a_values[
'desc'] = $this->
object->getObjectTranslation()->getDefaultDescription();
   648         $a_values[
'activation_online'] = $this->
object->getOfflineStatus() === 
false;
   654         $this->
object->setOfflineStatus(!(
bool) $form->
getInput(
'activation_online'));
   655         $this->
object->update();
   664         $this->object_service->commonSettings()->legacyForm($form, $this->
object)->saveIcon();
   665         $this->object_service->commonSettings()->legacyForm($form, $this->
object)->saveTileImage();
   670         $this->content_style_gui->redirectToObjectSettings();
 
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
 
getContent(string $ctrlLink='')
 
readonly LOMServices $lom_services
 
readonly ILIAS Style Content GUIService $content_style_gui
 
executeCommand()
execute command 
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
New implementation of ilObjectGUI. 
 
GUI class for the workflow of copying objects. 
 
updateCustom(ilPropertyFormGUI $form)
 
External facade for object content styles. 
 
static _gotoRepositoryNode(int $ref_id, string $cmd="")
 
prepareOutput(bool $show_sub_objects=true)
 
readonly GlobalHttpState $http
 
ilObjContentPageGUI: ilRepositoryGUI  ilObjContentPageGUI: ilAdministrationGUI  ilObjContentPageGUI: ...
 
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
 
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress 
 
Customizing of pimple-DIC for ILIAS. 
 
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
 
static _lookupObjId(int $ref_id)
 
static http()
Fetches the global http state from ILIAS. 
 
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
static _lookupTitle(int $obj_id)
 
getEditFormCustomValues(array &$a_values)
 
readonly PageMetricsService $pageMetricsService
 
readonly bool $in_page_editor_style_context
 
static getSyntaxStylePath()
 
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
 
Last visited history for repository items. 
 
addObserver(object $a_class, string $a_method, string $a_element)
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
afterSave(ilObject $new_object)
 
__construct(int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
__construct(Container $dic, ilPlugin $plugin)
 
const LP_CONTEXT_REPOSITORY
 
readonly ilNavigationHistory $navHistory
 
const INFO_TAB_VISIBILITY
 
addAvailabilitySection(ilPropertyFormGUI $form)
 
readonly ILIAS DI UIServices $uiServices
 
static _goto(string $target)
 
addHeaderAction()
Add header action menu. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setSettingsSubTabs(string $activeTab)
 
initEditCustomForm(ilPropertyFormGUI $a_form)
 
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call 
 
final const PRESENTATION_MODE_PRESENTATION
presentation mode for requesting 
 
GUI class for object translation handling.