ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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: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 649 of file class.ilObjContentPageGUI.php.

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

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

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

References ilDesktopItemHandling\addToDeskObject().

+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

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

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

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

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

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

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

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

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

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

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

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

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

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

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

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

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

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

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

References ilDesktopItemHandling\removeFromDeskObject().

+ Here is the call graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

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

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

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

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

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

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