ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjContentPageGUI Class Reference

Class ilObjContentPageGUI ilObjContentPageGUI: ilRepositoryGUI ilObjContentPageGUI: ilAdministrationGUI ilObjContentPageGUI: ilPermissionGUI ilObjContentPageGUI: ilInfoScreenGUI ilObjContentPageGUI: ilObjectCopyGUI ilObjContentPageGUI: ilExportGUI ilObjContentPageGUI: ilLearningProgressGUI ilObjContentPageGUI: ilCommonActionDispatcherGUI ilObjContentPageGUI: ilContentPagePageGUI ilObjContentPageGUI: ilObjectContentStyleSettingsGUI ilObjContentPageGUI: ilObjectTranslationGUI ilObjContentPageGUI: ilPageMultiLangGUI. 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 ()
 
 addToNavigationHistory ()
 
 renderHeaderActions ()
 
 infoScreenForward ()
 
 infoScreen ()
 
 view ()
 
 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)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 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 ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

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 ()
 
 setSettingsSubTabs (string $activeTab)
 
 addLocatorItems ()
 
 populateContentToolbar ()
 
 initStyleSheets ()
 
 afterSave (ilObject $new_object)
 
 setTitleAndDescription ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
- 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="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. 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...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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 ()
 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

GlobalHttpState $http
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
ILIAS Style Content GUIService $content_style_gui
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
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 = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
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 = ""
 

Private Member Functions

 addAvailabilitySection (ilPropertyFormGUI $form)
 

Private Attributes

ilNavigationHistory $navHistory
 
Container $dic
 
bool $infoScreenEnabled = false
 
PageMetricsService $pageMetricsService
 
ilHelpGUI $help
 
ILIAS DI UIServices $uiServices
 
bool $in_page_editor_style_context = false
 

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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 
- 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'
 

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 
)

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

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().

57  {
58  global $DIC;
59 
60  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
61 
62  $this->dic = $DIC;
63  $this->http = $this->dic->http();
64  $this->settings = $this->dic->settings();
65  $this->navHistory = $this->dic['ilNavigationHistory'];
66  $this->help = $DIC['ilHelp'];
67  $this->uiServices = $DIC->ui();
68 
69  $this->lng->loadLanguageModule('copa');
70  $this->lng->loadLanguageModule('style');
71  $this->lng->loadLanguageModule('content');
72  $this->lng->loadLanguageModule('rep');
73 
74  if ($this->object instanceof ilObjContentPage) {
75  $this->infoScreenEnabled = (bool) ilContainer::_lookupContainerSetting(
76  $this->object->getId(),
78  '1'
79  );
80  }
81 
82  $this->pageMetricsService = new PageMetricsService(
83  new PageMetricsRepositoryImp($DIC->database()),
84  $DIC->refinery()
85  );
86  $cs = $DIC->contentStyle();
87  $this->content_style_gui = $cs->gui();
88  if (is_object($this->object)) {
89  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
90  }
91 
92  $this->in_page_editor_style_context = $this->http->wrapper()->query()->has(
93  self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
94  );
95  $this->ctrl->saveParameterByClass(ilObjectContentStyleSettingsGUI::class, self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT);
96  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjContentPageGUI::_goto ( string  $target)
static

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

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

98  : void
99  {
100  global $DIC;
101  $main_tpl = $DIC->ui()->mainTemplate();
102 
103  $targetAttributes = explode('_', $target);
104  $refId = (int) $targetAttributes[0];
105 
106  if ($refId <= 0) {
107  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
108  }
109 
110  if ($DIC->access()->checkAccess('read', '', $refId)) {
111  $DIC->ctrl()->setTargetScript('ilias.php');
112  $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $refId);
113  $DIC->ctrl()->redirectByClass([
114  ilRepositoryGUI::class,
115  self::class,
116  ], self::UI_CMD_VIEW);
117  } elseif ($DIC->access()->checkAccess('visible', '', $refId)) {
119  } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
120  $main_tpl->setOnScreenMessage('info', sprintf(
121  $DIC->language()->txt('msg_no_perm_read_item'),
123  ), true);
124 
125  $DIC->ctrl()->setTargetScript('ilias.php');
126  $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
127  $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
128  }
129 
130  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
131  }
const ROOT_FOLDER_ID
Definition: constants.php:32
static _gotoRepositoryNode(int $ref_id, string $cmd="")
$refId
Definition: xapitoken.php:58
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:

◆ addAvailabilitySection()

ilObjContentPageGUI::addAvailabilitySection ( ilPropertyFormGUI  $form)
private

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

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

Referenced by initEditCustomForm().

579  : void
580  {
581  $section = new ilFormSectionHeaderGUI();
582  $section->setTitle($this->lng->txt('rep_activation_availability'));
583  $form->addItem($section);
584 
585  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
586  $online->setInfo($this->lng->txt('copa_activation_online_info'));
587  $form->addItem($online);
588  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a checkbox property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjContentPageGUI::addLocatorItems ( )
protected

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

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

434  : void
435  {
436  if ($this->object instanceof ilObject) {
437  $this->locator->addItem(
438  $this->object->getTitle(),
439  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
440  '',
441  $this->object->getRefId()
442  );
443  }
444  }
+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

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

Referenced by setTabs().

371  : void
372  {
373  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
374  $this->navHistory->addItem(
375  $this->object->getRefId(),
376  ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
377  $this->object->getType()
378  );
379  }
380  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterSave()

ilObjContentPageGUI::afterSave ( ilObject  $new_object)
protected

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

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

518  : void
519  {
520  $new_object->getObjectTranslation()->addLanguage(
521  $this->lng->getDefaultLanguage(),
522  $new_object->getTitle(),
523  $new_object->getDescription(),
524  true,
525  true
526  );
527  $new_object->getObjectTranslation()->save();
528 
529  $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
530  $this->ctrl->redirect($this, 'edit');
531  }
+ Here is the call graph for this function:

◆ editStyleProperties()

ilObjContentPageGUI::editStyleProperties ( )

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

617  : void
618  {
619  $this->content_style_gui->redirectToObjectSettings();
620  }

◆ getContent()

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

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

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().

485  : string
486  {
487  if ($this->checkPermissionBool('read')) {
488  $this->object->trackProgress($this->user->getId());
489 
490  $this->initStyleSheets();
491 
492  $forwarder = new ilContentPagePageCommandForwarder(
493  $this->http,
494  $this->ctrl,
495  $this->tabs_gui,
496  $this->lng,
497  $this->object,
498  $this->user,
499  $this->refinery,
500  $this->content_style_domain
501  );
503 
504  return $forwarder->forward($ctrlLink);
505  }
506 
507  return '';
508  }
static http()
Fetches the global http state from ILIAS.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
const PRESENTATION_MODE_PRESENTATION
presentation mode for requesting
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjContentPageGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

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

590  : void
591  {
592  $a_values['activation_online'] = $this->object->getOfflineStatus() === false;
594 
595  if (count($this->object->getObjectTranslation()->getLanguages()) > 1) {
596  $a_values['title'] = $this->object->getObjectTranslation()->getDefaultTitle();
597  $a_values['desc'] = $this->object->getObjectTranslation()->getDefaultDescription();
598  }
599  }
+ Here is the call graph for this function:

◆ getType()

ilObjContentPageGUI::getType ( )

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

133  : string
134  {
135  return self::OBJ_TYPE;
136  }

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )

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

References ILIAS\Repository\ctrl(), and infoScreenForward().

446  : void
447  {
448  $this->ctrl->setCmd('showSummary');
449  $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
450 
451  $this->infoScreenForward();
452  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

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

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

Referenced by infoScreen(), and setTabs().

389  : void
390  {
391  if (!$this->infoScreenEnabled) {
392  return;
393  }
394 
395  if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
396  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
397  }
398 
399  $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
400 
401  $info = new ilInfoScreenGUI($this);
402  $info->enableLearningProgress();
403  $info->enablePrivateNotes();
404  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
405 
406  $this->ctrl->forwardCommand($info);
407  }
Class ilInfoScreenGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjContentPageGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

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

541  : void
542  {
543  $this->addAvailabilitySection($a_form);
544 
545  $presentationHeader = new ilFormSectionHeaderGUI();
546  $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
547  $a_form->addItem($presentationHeader);
548 
549  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addIcon();
550  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
551 
552  $sh = new ilFormSectionHeaderGUI();
553  $sh->setTitle($this->lng->txt('obj_features'));
554  $a_form->addItem($sh);
555 
557  $this->object->getId(),
558  $a_form,
559  [
561  ]
562  );
563 
564  if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
565  $languages = ilMDLanguageItem::_getLanguages();
566  $a_form->getItemByPostVar('title')
567  ->setInfo(
568  implode(
569  ': ',
570  [
571  $this->lng->txt('language'),
572  $languages[$this->object->getObjectTranslation()->getDefaultLanguage()]
573  ]
574  )
575  );
576  }
577  }
getItemByPostVar(string $a_post_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
addAvailabilitySection(ilPropertyFormGUI $form)
+ Here is the call graph for this function:

◆ initStyleSheets()

ilObjContentPageGUI::initStyleSheets ( )
protected

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

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

Referenced by getContent().

510  : void
511  {
512  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
513  $this->tpl->setCurrentBlock('SyntaxStyle');
514  $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
515  $this->tpl->parseCurrentBlock();
516  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentToolbar()

ilObjContentPageGUI::populateContentToolbar ( )
protected

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

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

Referenced by view().

467  : void
468  {
469  if (!$this->user->isAnonymous() && $this->checkPermissionBool('write')) {
470  $this->lng->loadLanguageModule('cntr');
471  $this->toolbar->addComponent(
472  $this->uiServices->factory()->button()->primary(
473  $this->lng->txt('cntr_text_media_editor'),
474  $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
475  )
476  );
477  }
478  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

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

Referenced by setTabs().

382  : void
383  {
384  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
385  $this->addHeaderAction();
386  }
387  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
addHeaderAction()
Add header action menu.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjContentPageGUI::setSettingsSubTabs ( string  $activeTab)
protected

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

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

Referenced by setTabs().

409  : void
410  {
411  if ($this->checkPermissionBool('write')) {
412  $this->tabs_gui->addSubTab(
413  self::UI_TAB_ID_SETTINGS,
414  $this->lng->txt('settings'),
415  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
416  );
417 
418  $this->tabs_gui->addSubTab(
419  self::UI_TAB_ID_STYLE,
420  $this->lng->txt('cont_style'),
421  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
422  );
423 
424  $this->tabs_gui->addSubTab(
425  self::UI_TAB_ID_I18N,
426  $this->lng->txt('obj_multilinguality'),
427  $this->ctrl->getLinkTargetByClass(ilObjectTranslationGUI::class)
428  );
429 
430  $this->tabs_gui->activateSubTab($activeTab);
431  }
432  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjContentPageGUI::setTabs ( )
protected

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

References ilObjectGUI\$object, addToNavigationHistory(), ilLearningProgressAccess\checkAccess(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObject2GUI\executeCommand(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), infoScreenForward(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), ILIAS\ContentPage\PageMetrics\Event\PageUpdatedEvent\page(), ilObject2GUI\prepareOutput(), ILIAS\Repository\refinery(), renderHeaderActions(), ilObject2GUI\setLocator(), setSettingsSubTabs(), and ILIAS\Repository\user().

138  : void
139  {
140  if ($this->in_page_editor_style_context) {
141  return;
142  }
143 
144  $this->help->setScreenIdComponent($this->object->getType());
145 
146  if ($this->checkPermissionBool('read')) {
147  $this->tabs_gui->addTab(
148  self::UI_TAB_ID_CONTENT,
149  $this->lng->txt('content'),
150  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW)
151  );
152  }
153 
154  if ($this->infoScreenEnabled && ($this->checkPermissionBool('visible') || $this->checkPermissionBool('read'))) {
155  $this->tabs_gui->addTab(
156  self::UI_TAB_ID_INFO,
157  $this->lng->txt('info_short'),
158  $this->ctrl->getLinkTargetByClass(ilInfoScreenGUI::class, 'showSummary')
159  );
160  }
161 
162  if ($this->checkPermissionBool('write')) {
163  $this->tabs_gui->addTab(
164  self::UI_TAB_ID_SETTINGS,
165  $this->lng->txt('settings'),
166  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
167  );
168  }
169 
170  if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
171  $this->tabs_gui->addTab(
172  self::UI_TAB_ID_LP,
173  $this->lng->txt('learning_progress'),
174  $this->ctrl->getLinkTargetByClass(ilLearningProgressGUI::class)
175  );
176  }
177 
178  if ($this->checkPermissionBool('write')) {
179  $this->tabs_gui->addTab(
180  self::UI_TAB_ID_EXPORT,
181  $this->lng->txt('export'),
182  $this->ctrl->getLinkTargetByClass(ilExportGUI::class)
183  );
184  }
185 
186  if ($this->checkPermissionBool('edit_permission')) {
187  $this->tabs_gui->addTab(
188  self::UI_TAB_ID_PERMISSIONS,
189  $this->lng->txt('perm_settings'),
190  $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, 'perm')
191  );
192  }
193  }
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjContentPageGUI::setTitleAndDescription ( )
protected

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

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

533  : void
534  {
535  parent::setTitleAndDescription();
536 
537  $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
538  $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
539  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
+ Here is the call graph for this function:

◆ updateCustom()

ilObjContentPageGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

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

601  : void
602  {
603  $this->object->setOfflineStatus(!(bool) $form->getInput('activation_online'));
604  $this->object->update();
605 
607  $this->object->getId(),
608  $form,
609  [
611  ]
612  );
613  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
614  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
615  }
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-...
+ Here is the call graph for this function:

◆ view()

ilObjContentPageGUI::view ( )

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

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

454  : void
455  {
456  $this->checkPermission('read');
457 
458  $this->populateContentToolbar();
459 
460  $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
461 
462  $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
463 
464  $this->tpl->setContent($this->getContent());
465  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
getContent(string $ctrlLink='')
+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjContentPageGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjContentPageGUI::$content_style_gui
protected

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

◆ $dic

Container ilObjContentPageGUI::$dic
private

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

◆ $help

ilHelpGUI ilObjContentPageGUI::$help
private

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

◆ $http

GlobalHttpState ilObjContentPageGUI::$http
protected

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

◆ $in_page_editor_style_context

bool ilObjContentPageGUI::$in_page_editor_style_context = false
private

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

◆ $infoScreenEnabled

bool ilObjContentPageGUI::$infoScreenEnabled = false
private

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

Referenced by getEditFormCustomValues().

◆ $navHistory

ilNavigationHistory ilObjContentPageGUI::$navHistory
private

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

◆ $pageMetricsService

PageMetricsService ilObjContentPageGUI::$pageMetricsService
private

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

◆ $uiServices

ILIAS DI UIServices ilObjContentPageGUI::$uiServices
private

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


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