ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjContentPageGUI Class Reference

@ilCtrl_isCalledBy ilObjContentPageGUI: ilRepositoryGUI @ilCtrl_isCalledBy ilObjContentPageGUI: ilAdministrationGUI @ilCtrl_Calls ilObjContentPageGUI: ilPermissionGUI @ilCtrl_Calls ilObjContentPageGUI: ilInfoScreenGUI @ilCtrl_Calls ilObjContentPageGUI: ilObjectCopyGUI @ilCtrl_Calls ilObjContentPageGUI: ilExportGUI @ilCtrl_Calls ilObjContentPageGUI: ilLearningProgressGUI @ilCtrl_Calls ilObjContentPageGUI: ilCommonActionDispatcherGUI @ilCtrl_Calls ilObjContentPageGUI: ilContentPagePageGUI @ilCtrl_Calls ilObjContentPageGUI: ilObjectContentStyleSettingsGUI @ilCtrl_Calls ilObjContentPageGUI: ILIAS\ILIASObject\Properties\Translations\TranslationGUI @ilCtrl_Calls ilObjContentPageGUI: ilPageMultiLangGUI @ilCtrl_Calls ilObjContentPageGUI: ilMDEditorGUI More...

+ Inheritance diagram for ilObjContentPageGUI:
+ Collaboration diagram for ilObjContentPageGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 Functions that must be overwritten. More...
 
 addToNavigationHistory ()
 
 renderHeaderActions ()
 
 infoScreenForward ()
 
 infoScreen ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getContent (string $ctrlLink='')
 
 editStyleProperties ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto (string $target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 setTabs ()
 create tabs (repository/workspace switch) More...
 
 addToDesk ()
 
 removeFromDesk ()
 
 setSettingsSubTabs (string $activeTab)
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 populateContentToolbar ()
 
 initStyleSheets ()
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 setTitleAndDescription ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Member Functions

 addAvailabilitySection (ilPropertyFormGUI $form)
 

Private Attributes

ILIAS Style Content Object ObjectFacade $content_style_domain = null
 
readonly ILIAS Style Content GUIService $content_style_gui
 
readonly ilNavigationHistory $navHistory
 
readonly Container $dic
 
bool $infoScreenEnabled = false
 
readonly PageMetricsService $pageMetricsService
 
readonly ilHelpGUI $help
 
readonly ILIAS DI UIServices $uiServices
 
readonly bool $in_page_editor_style_context
 
readonly LOMServices $lom_services
 
readonly Translations $translation
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Data Fields inherited from ilContentPageObjectConstants
const OBJ_TYPE = 'copa'
 
const HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT = 'page_editor_style'
 
const UI_CMD_VIEW = 'view'
 
const UI_CMD_EDIT = 'edit'
 
const UI_CMD_UPDATE = 'update'
 
const UI_CMD_COPAGE_DOWNLOAD_FILE = 'downloadFile'
 
const UI_CMD_COPAGE_DISPLAY_FULLSCREEN = 'displayMediaFullscreen'
 
const UI_CMD_COPAGE_DISPLAY_MEDIA = 'displayMedia'
 
const UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH = 'download_paragraph'
 
const UI_CMD_COPAGE_EDIT = 'edit'
 
const UI_CMD_STYLES_EDIT = 'editStyleProperties'
 
const UI_TAB_ID_CONTENT = 'content'
 
const UI_TAB_ID_INFO = 'info_short'
 
const UI_TAB_ID_SETTINGS = 'settings'
 
const UI_TAB_ID_STYLE = 'style'
 
const UI_TAB_ID_I18N = 'i18n'
 
const UI_TAB_ID_LP = 'learning_progress'
 
const UI_TAB_ID_EXPORT = 'export'
 
const UI_TAB_ID_PERMISSIONS = 'perm_settings'
 
const UI_TAB_ID_MD = 'meta_data'
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjContentPageGUI::__construct ( int  $a_id = 0,
int  $a_id_type = self::REPOSITORY_NODE_ID,
int  $a_parent_node_id = 0 
)

Reimplemented from ilObject2GUI.

Definition at line 60 of file class.ilObjContentPageGUI.php.

61 {
62 global $DIC;
63
64 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
65
66 $this->dic = $DIC;
67 $this->settings = $this->dic->settings();
68 $this->navHistory = $this->dic['ilNavigationHistory'];
69 $this->help = $DIC['ilHelp'];
70 $this->uiServices = $DIC->ui();
71 $this->lom_services = $DIC->learningObjectMetadata();
72
73 $this->lng->loadLanguageModule('copa');
74 $this->lng->loadLanguageModule('style');
75 $this->lng->loadLanguageModule('content');
76 $this->lng->loadLanguageModule('rep');
77
78 if ($this->object instanceof ilObjContentPage) {
79 $this->infoScreenEnabled = (bool) ilContainer::_lookupContainerSetting(
80 $this->object->getId(),
82 '1'
83 );
84 }
85
86 $this->pageMetricsService = new PageMetricsService(
87 new PageMetricsRepositoryImp($DIC->database()),
88 $DIC->refinery()
89 );
90 $cs = $DIC->contentStyle();
91 $this->content_style_gui = $cs->gui();
92 if (is_object($this->object)) {
93 $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
94 $this->translation = $this->object->getObjectProperties()->getPropertyTranslations();
95 }
96
97 $this->in_page_editor_style_context = $this->http->wrapper()->query()->has(
98 self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
99 );
100 $this->ctrl->saveParameterByClass(
101 ilObjectContentStyleSettingsGUI::class,
102 self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
103 );
104 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjContentPageGUI::_goto ( string  $target)
static

Definition at line 106 of file class.ilObjContentPageGUI.php.

106 : void
107 {
108 global $DIC;
109 $main_tpl = $DIC->ui()->mainTemplate();
110
111 $targetAttributes = explode('_', $target);
112 $refId = (int) $targetAttributes[0];
113
114 if ($refId <= 0) {
115 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
116 }
117
118 if ($DIC->access()->checkAccess('read', '', $refId)) {
119 $DIC->ctrl()->setTargetScript('ilias.php');
120 $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $refId);
121 $DIC->ctrl()->redirectByClass([
122 ilRepositoryGUI::class,
123 self::class,
124 ], self::UI_CMD_VIEW);
125 } elseif ($DIC->access()->checkAccess('visible', '', $refId)) {
127 } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
128 $main_tpl->setOnScreenMessage(
129 'info',
130 sprintf(
131 $DIC->language()->txt('msg_no_perm_read_item'),
133 ),
134 true
135 );
136
137 $DIC->ctrl()->setTargetScript('ilias.php');
138 $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
139 $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
140 }
141
142 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
143 }
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
$refId
Definition: xapitoken.php:58

References $DIC, $refId, ilObjectGUI\_gotoRepositoryNode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ addAvailabilitySection()

ilObjContentPageGUI::addAvailabilitySection ( ilPropertyFormGUI  $form)
private

Definition at line 648 of file class.ilObjContentPageGUI.php.

648 : void
649 {
650 $section = new ilFormSectionHeaderGUI();
651 $section->setTitle($this->lng->txt('rep_activation_availability'));
652 $form->addItem($section);
653
654 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
655 $online->setInfo($this->lng->txt('copa_activation_online_info'));
656 $form->addItem($online);
657 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.

References ilPropertyFormGUI\addItem(), and ILIAS\Repository\lng().

Referenced by initEditCustomForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjContentPageGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 499 of file class.ilObjContentPageGUI.php.

499 : void
500 {
501 if ($this->object instanceof ilObject) {
502 $this->locator->addItem(
503 $this->object->getTitle(),
504 $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
505 '',
506 $this->object->getRefId()
507 );
508 }
509 }
Class ilObject Basic functions for all objects.

References ILIAS\Repository\locator(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addToDesk()

ilObjContentPageGUI::addToDesk ( )
protected

Definition at line 422 of file class.ilObjContentPageGUI.php.

422 : void
423 {
424 $this->addToDeskObject();
425 }

References ilDesktopItemHandling\addToDeskObject().

+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

Definition at line 432 of file class.ilObjContentPageGUI.php.

432 : void
433 {
434 if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
435 $this->navHistory->addItem(
436 $this->object->getRefId(),
437 ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
438 $this->object->getType()
439 );
440 }
441 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)

References ilObject2GUI\checkPermissionBool(), ilObject2GUI\getCreationMode(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ afterSave()

ilObjContentPageGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 580 of file class.ilObjContentPageGUI.php.

580 : void
581 {
582 $new_object->getObjectProperties()->storePropertyTranslations(
583 $new_object->getObjectTranslation()->withLanguage(
584 new Language(
585 $this->lng->getDefaultLanguage(),
586 $new_object->getTitle(),
587 $new_object->getDescription(),
588 true
589 )
590 )
591 );
592
593 $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
594 $this->ctrl->redirect($this, 'edit');
595 }

References ILIAS\Repository\ctrl(), ilObject\getDescription(), ilObject\getObjectProperties(), ilObject\getTitle(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editStyleProperties()

ilObjContentPageGUI::editStyleProperties ( )

Definition at line 686 of file class.ilObjContentPageGUI.php.

686 : void
687 {
688 $this->content_style_gui->redirectToObjectSettings();
689 }

◆ getContent()

ilObjContentPageGUI::getContent ( string  $ctrlLink = '')
Parameters
string$ctrlLinkA link which describes the target controller for all page object links/actions
Exceptions
ilException

Definition at line 546 of file class.ilObjContentPageGUI.php.

546 : string
547 {
548 if ($this->checkPermissionBool('read')) {
549 $this->object->trackProgress($this->user->getId());
550
551 $this->initStyleSheets();
552
553 $forwarder = new ilContentPagePageCommandForwarder(
554 $this->http,
555 $this->ctrl,
556 $this->tabs_gui,
557 $this->lng,
558 $this->object,
559 $this->translation,
560 $this->user,
561 $this->refinery,
562 $this->content_style_domain
563 );
565
566 return $forwarder->forward($ctrlLink);
567 }
568
569 return '';
570 }
final const string PRESENTATION_MODE_PRESENTATION
presentation mode for requesting

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), initStyleSheets(), ILIAS\Repository\lng(), ilContentPagePageCommandForwarder\PRESENTATION_MODE_PRESENTATION, ILIAS\Repository\refinery(), and ILIAS\Repository\user().

Referenced by view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjContentPageGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Reimplemented from ilObjectGUI.

Definition at line 659 of file class.ilObjContentPageGUI.php.

659 : void
660 {
661 if (count($this->object->getObjectTranslation()->getLanguages()) > 1) {
662 $a_values['title'] = $this->object->getObjectTranslation()->getDefaultTitle();
663 $a_values['desc'] = $this->object->getObjectTranslation()->getDefaultDescription();
664 }
665
666 $a_values['activation_online'] = $this->object->getOfflineStatus() === false;
668 }

References $infoScreenEnabled, ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getType()

ilObjContentPageGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 145 of file class.ilObjContentPageGUI.php.

145 : string
146 {
147 return self::OBJ_TYPE;
148 }

References ilContentPageObjectConstants\OBJ_TYPE.

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )

Definition at line 511 of file class.ilObjContentPageGUI.php.

511 : void
512 {
513 $this->infoScreenForward();
514 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

Definition at line 450 of file class.ilObjContentPageGUI.php.

450 : void
451 {
452 if (!$this->infoScreenEnabled) {
453 return;
454 }
455
456 if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
457 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
458 }
459
460 if (strtolower($this->ctrl->getCmd() ?? '') === 'infoscreen') {
461 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
462 }
463
464 $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
465
466 $info = new ilInfoScreenGUI($this);
467 $info->enableLearningProgress();
468 $info->enablePrivateNotes();
469 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
470
471 $this->ctrl->forwardCommand($info);
472 }
error(string $a_errmsg)
Class ilInfoScreenGUI.
$info
Definition: entry_point.php:21

References $info, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), error(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by infoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjContentPageGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjectGUI.

Definition at line 605 of file class.ilObjContentPageGUI.php.

605 : void
606 {
607 $this->addAvailabilitySection($a_form);
608
609 $presentationHeader = new ilFormSectionHeaderGUI();
610 $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
611 $a_form->addItem($presentationHeader);
612
613 $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addIcon();
614 $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
615
616 $sh = new ilFormSectionHeaderGUI();
617 $sh->setTitle($this->lng->txt('obj_features'));
618 $a_form->addItem($sh);
619
621 $this->object->getId(),
622 $a_form,
623 [
625 ]
626 );
627
628 if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
629 $language = '';
630 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $lom_lang) {
631 if ($lom_lang->value() === $this->object->getObjectTranslation()->getDefaultLanguage()) {
632 $language = $lom_lang->presentableLabel();
633 }
634 }
635 $a_form->getItemByPostVar('title')
636 ->setInfo(
637 implode(
638 ': ',
639 [
640 $this->lng->txt('language'),
641 $language
642 ]
643 )
644 );
645 }
646 }
addAvailabilitySection(ilPropertyFormGUI $form)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
getItemByPostVar(string $a_post_var)

References addAvailabilitySection(), ilPropertyFormGUI\addItem(), ilObject2GUI\getCreationMode(), ilPropertyFormGUI\getItemByPostVar(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ initStyleSheets()

ilObjContentPageGUI::initStyleSheets ( )
protected

Definition at line 572 of file class.ilObjContentPageGUI.php.

572 : void
573 {
574 $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
575 $this->tpl->setCurrentBlock('SyntaxStyle');
576 $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
577 $this->tpl->parseCurrentBlock();
578 }

References ilObjStyleSheet\getSyntaxStylePath(), and ILIAS\Repository\object().

Referenced by getContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentToolbar()

ilObjContentPageGUI::populateContentToolbar ( )
protected

Definition at line 529 of file class.ilObjContentPageGUI.php.

529 : void
530 {
531 if (!$this->user->isAnonymous() && $this->checkPermissionBool('write')) {
532 $this->lng->loadLanguageModule('cntr');
533 $this->toolbar->addComponent(
534 $this->uiServices->factory()->button()->primary(
535 $this->lng->txt('cntr_text_media_editor'),
536 $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
537 )
538 );
539 }
540 }

References ILIAS\Repository\lng(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromDesk()

ilObjContentPageGUI::removeFromDesk ( )
protected

Definition at line 427 of file class.ilObjContentPageGUI.php.

427 : void
428 {
429 $this->removeFromDeskObject();
430 }

References ilDesktopItemHandling\removeFromDeskObject().

+ Here is the call graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

Definition at line 443 of file class.ilObjContentPageGUI.php.

443 : void
444 {
445 if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
446 $this->addHeaderAction();
447 }
448 }
addHeaderAction()
Add header action menu.

References ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermissionBool(), and ilObject2GUI\getCreationMode().

+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjContentPageGUI::setSettingsSubTabs ( string  $activeTab)
protected

Definition at line 474 of file class.ilObjContentPageGUI.php.

474 : void
475 {
476 if ($this->checkPermissionBool('write')) {
477 $this->tabs_gui->addSubTab(
478 self::UI_TAB_ID_SETTINGS,
479 $this->lng->txt('general'),
480 $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
481 );
482
483 $this->tabs_gui->addSubTab(
484 self::UI_TAB_ID_STYLE,
485 $this->lng->txt('cont_style'),
486 $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
487 );
488
489 $this->tabs_gui->addSubTab(
490 self::UI_TAB_ID_I18N,
491 $this->lng->txt('obj_multilinguality'),
492 $this->ctrl->getLinkTargetByClass(TranslationGUI::class)
493 );
494
495 $this->tabs_gui->activateSubTab($activeTab);
496 }
497 }

References ilObject2GUI\checkPermissionBool(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ setTabs()

ilObjContentPageGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 150 of file class.ilObjContentPageGUI.php.

150 : void
151 {
152 if ($this->in_page_editor_style_context) {
153 return;
154 }
155
156 $this->help->setScreenIdComponent($this->object->getType());
157
158 if ($this->checkPermissionBool('read')) {
159 $this->tabs_gui->addTab(
160 self::UI_TAB_ID_CONTENT,
161 $this->lng->txt('content'),
162 $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW)
163 );
164 }
165
166 if ($this->infoScreenEnabled && ($this->checkPermissionBool('visible') || $this->checkPermissionBool('read'))) {
167 $this->tabs_gui->addTab(
168 self::UI_TAB_ID_INFO,
169 $this->lng->txt('info_short'),
170 $this->ctrl->getLinkTargetByClass(ilInfoScreenGUI::class, 'showSummary')
171 );
172 }
173
174 if ($this->checkPermissionBool('write')) {
175 $this->tabs_gui->addTab(
176 self::UI_TAB_ID_SETTINGS,
177 $this->lng->txt('settings'),
178 $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
179 );
180 }
181
182 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
183 $this->tabs_gui->addTab(
184 self::UI_TAB_ID_LP,
185 $this->lng->txt('learning_progress'),
186 $this->ctrl->getLinkTargetByClass(ilLearningProgressGUI::class)
187 );
188 }
189
190 if ($this->checkPermissionBool('write')) {
191 $this->tabs_gui->addTab(
192 self::UI_TAB_ID_MD,
193 $this->lng->txt('meta_data'),
194 $this->ctrl->getLinkTargetByClass(ilMDEditorGUI::class)
195 );
196 }
197
198 if ($this->checkPermissionBool('write')) {
199 $this->tabs_gui->addTab(
200 self::UI_TAB_ID_EXPORT,
201 $this->lng->txt('export'),
202 $this->ctrl->getLinkTargetByClass(ilExportGUI::class)
203 );
204 }
205
206 if ($this->checkPermissionBool('edit_permission')) {
207 $this->tabs_gui->addTab(
208 self::UI_TAB_ID_PERMISSIONS,
209 $this->lng->txt('perm_settings'),
210 $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, 'perm')
211 );
212 }
213 }
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress

References ilLearningProgressAccess\checkAccess(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\help(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjContentPageGUI::setTitleAndDescription ( )
protected

Reimplemented from ilObject2GUI.

Definition at line 597 of file class.ilObjContentPageGUI.php.

597 : void
598 {
599 parent::setTitleAndDescription();
600
601 $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
602 $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
603 }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.

References ilObject\_getIcon(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjContentPageGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Insert custom update form values into object.

Reimplemented from ilObjectGUI.

Definition at line 670 of file class.ilObjContentPageGUI.php.

670 : void
671 {
672 $this->object->setOfflineStatus(!(bool) $form->getInput('activation_online'));
673 $this->object->update();
674
676 $this->object->getId(),
677 $form,
678 [
680 ]
681 );
682 $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
683 $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
684 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ilPropertyFormGUI\getInput(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ view()

ilObjContentPageGUI::view ( )

view object content (repository/workspace switch)

Reimplemented from ilObject2GUI.

Definition at line 516 of file class.ilObjContentPageGUI.php.

516 : void
517 {
518 $this->checkPermission('read');
519
520 $this->populateContentToolbar();
521
522 $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
523
524 $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
525
526 $this->tpl->setContent($this->getContent());
527 }
getContent(string $ctrlLink='')
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ilObject2GUI\checkPermission(), getContent(), ILIAS\Repository\object(), and populateContentToolbar().

+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjContentPageGUI::$content_style_domain = null
private

Definition at line 48 of file class.ilObjContentPageGUI.php.

◆ $content_style_gui

readonly ILIAS Style Content GUIService ilObjContentPageGUI::$content_style_gui
private

Definition at line 49 of file class.ilObjContentPageGUI.php.

◆ $dic

readonly Container ilObjContentPageGUI::$dic
private

Definition at line 51 of file class.ilObjContentPageGUI.php.

◆ $help

readonly ilHelpGUI ilObjContentPageGUI::$help
private

Definition at line 54 of file class.ilObjContentPageGUI.php.

◆ $in_page_editor_style_context

readonly bool ilObjContentPageGUI::$in_page_editor_style_context
private

Definition at line 56 of file class.ilObjContentPageGUI.php.

◆ $infoScreenEnabled

bool ilObjContentPageGUI::$infoScreenEnabled = false
private

Definition at line 52 of file class.ilObjContentPageGUI.php.

Referenced by getEditFormCustomValues().

◆ $lom_services

readonly LOMServices ilObjContentPageGUI::$lom_services
private

Definition at line 57 of file class.ilObjContentPageGUI.php.

◆ $navHistory

readonly ilNavigationHistory ilObjContentPageGUI::$navHistory
private

Definition at line 50 of file class.ilObjContentPageGUI.php.

◆ $pageMetricsService

readonly PageMetricsService ilObjContentPageGUI::$pageMetricsService
private

Definition at line 53 of file class.ilObjContentPageGUI.php.

◆ $translation

readonly Translations ilObjContentPageGUI::$translation
private

Definition at line 58 of file class.ilObjContentPageGUI.php.

◆ $uiServices

readonly ILIAS DI UIServices ilObjContentPageGUI::$uiServices
private

Definition at line 55 of file class.ilObjContentPageGUI.php.


The documentation for this class was generated from the following file: