ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 $this->lng->loadLanguageModule('obj');
78
79 if ($this->object instanceof ilObjContentPage) {
80 $this->infoScreenEnabled = (bool) ilContainer::_lookupContainerSetting(
81 $this->object->getId(),
83 '1'
84 );
85 }
86
87 $this->pageMetricsService = new PageMetricsService(
88 new PageMetricsRepositoryImp($DIC->database()),
89 $DIC->refinery()
90 );
91 $cs = $DIC->contentStyle();
92 $this->content_style_gui = $cs->gui();
93 if (is_object($this->object)) {
94 $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
95 $this->translation = $this->object->getObjectProperties()->getPropertyTranslations();
96 }
97
98 $this->in_page_editor_style_context = $this->http->wrapper()->query()->has(
99 self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
100 );
101 $this->ctrl->saveParameterByClass(
102 ilObjectContentStyleSettingsGUI::class,
103 self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
104 );
105 }
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 107 of file class.ilObjContentPageGUI.php.

107 : void
108 {
109 global $DIC;
110 $main_tpl = $DIC->ui()->mainTemplate();
111
112 $targetAttributes = explode('_', $target);
113 $refId = (int) $targetAttributes[0];
114
115 if ($refId <= 0) {
116 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
117 }
118
119 if ($DIC->access()->checkAccess('read', '', $refId)) {
120 $DIC->ctrl()->setTargetScript('ilias.php');
121 $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $refId);
122 $DIC->ctrl()->redirectByClass([
123 ilRepositoryGUI::class,
124 self::class,
125 ], self::UI_CMD_VIEW);
126 } elseif ($DIC->access()->checkAccess('visible', '', $refId)) {
128 } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
129 $main_tpl->setOnScreenMessage(
130 'info',
131 sprintf(
132 $DIC->language()->txt('msg_no_perm_read_item'),
134 ),
135 true
136 );
137
138 $DIC->ctrl()->setTargetScript('ilias.php');
139 $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
140 $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
141 }
142
143 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
144 }
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:56

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 650 of file class.ilObjContentPageGUI.php.

650 : void
651 {
652 $section = new ilFormSectionHeaderGUI();
653 $section->setTitle($this->lng->txt('rep_activation_availability'));
654 $form->addItem($section);
655
656 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
657 $online->setInfo($this->lng->txt('copa_activation_online_info'));
658 $form->addItem($online);
659 }
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 501 of file class.ilObjContentPageGUI.php.

501 : void
502 {
503 if ($this->object instanceof ilObject) {
504 $this->locator->addItem(
505 $this->object->getTitle(),
506 $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
507 '',
508 $this->object->getRefId()
509 );
510 }
511 }
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 424 of file class.ilObjContentPageGUI.php.

424 : void
425 {
426 $this->addToDeskObject();
427 }

References ilDesktopItemHandling\addToDeskObject().

+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

434 : void
435 {
436 if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
437 $this->navHistory->addItem(
438 $this->object->getRefId(),
439 ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
440 $this->object->getType()
441 );
442 }
443 }
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 582 of file class.ilObjContentPageGUI.php.

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

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 688 of file class.ilObjContentPageGUI.php.

688 : void
689 {
690 $this->content_style_gui->redirectToObjectSettings();
691 }

◆ 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 548 of file class.ilObjContentPageGUI.php.

548 : string
549 {
550 if ($this->checkPermissionBool('read')) {
551 $this->object->trackProgress($this->user->getId());
552
553 $this->initStyleSheets();
554
555 $forwarder = new ilContentPagePageCommandForwarder(
556 $this->http,
557 $this->ctrl,
558 $this->tabs_gui,
559 $this->lng,
560 $this->object,
561 $this->translation,
562 $this->user,
563 $this->refinery,
564 $this->content_style_domain
565 );
567
568 return $forwarder->forward($ctrlLink);
569 }
570
571 return '';
572 }
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 661 of file class.ilObjContentPageGUI.php.

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

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 146 of file class.ilObjContentPageGUI.php.

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

References ilContentPageObjectConstants\OBJ_TYPE.

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )

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

513 : void
514 {
515 $this->infoScreenForward();
516 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

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

452 : void
453 {
454 if (!$this->infoScreenEnabled) {
455 return;
456 }
457
458 if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
459 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
460 }
461
462 if (strtolower($this->ctrl->getCmd() ?? '') === 'infoscreen') {
463 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
464 }
465
466 $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
467
468 $info = new ilInfoScreenGUI($this);
469 $info->enableLearningProgress();
470 $info->enablePrivateNotes();
471 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
472
473 $this->ctrl->forwardCommand($info);
474 }
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 607 of file class.ilObjContentPageGUI.php.

607 : void
608 {
609 $this->addAvailabilitySection($a_form);
610
611 $presentationHeader = new ilFormSectionHeaderGUI();
612 $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
613 $a_form->addItem($presentationHeader);
614
615 $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addIcon();
616 $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
617
618 $sh = new ilFormSectionHeaderGUI();
619 $sh->setTitle($this->lng->txt('obj_features'));
620 $a_form->addItem($sh);
621
623 $this->object->getId(),
624 $a_form,
625 [
627 ]
628 );
629
630 if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
631 $language = '';
632 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $lom_lang) {
633 if ($lom_lang->value() === $this->object->getObjectTranslation()->getDefaultLanguage()) {
634 $language = $lom_lang->presentableLabel();
635 }
636 }
637 $a_form->getItemByPostVar('title')
638 ->setInfo(
639 implode(
640 ': ',
641 [
642 $this->lng->txt('language'),
643 $language
644 ]
645 )
646 );
647 }
648 }
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 574 of file class.ilObjContentPageGUI.php.

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

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 531 of file class.ilObjContentPageGUI.php.

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

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 429 of file class.ilObjContentPageGUI.php.

429 : void
430 {
431 $this->removeFromDeskObject();
432 }

References ilDesktopItemHandling\removeFromDeskObject().

+ Here is the call graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

445 : void
446 {
447 if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
448 $this->addHeaderAction();
449 }
450 }
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 476 of file class.ilObjContentPageGUI.php.

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

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 151 of file class.ilObjContentPageGUI.php.

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

599 : void
600 {
601 parent::setTitleAndDescription();
602
603 $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
604 $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
605 }
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 672 of file class.ilObjContentPageGUI.php.

672 : void
673 {
674 $this->object->setOfflineStatus(!(bool) $form->getInput('activation_online'));
675 $this->object->update();
676
678 $this->object->getId(),
679 $form,
680 [
682 ]
683 );
684 $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
685 $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
686 }
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 518 of file class.ilObjContentPageGUI.php.

518 : void
519 {
520 $this->checkPermission('read');
521
522 $this->populateContentToolbar();
523
524 $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
525
526 $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
527
528 $this->tpl->setContent($this->getContent());
529 }
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: