ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 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 ()
 
 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)
 
 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] 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)
 
 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 ()
 
 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 ()
 
 addToDesk ()
 
 removeFromDesk ()
 
 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="")
 
 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...
 
- 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...
 
 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...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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...
 
 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...
 

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
 
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 = []
 
 $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
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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

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

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'
 
const UI_TAB_ID_MD = 'meta_data'
 

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__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().

58  {
59  global $DIC;
60 
61  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
62 
63  $this->dic = $DIC;
64  $this->http = $this->dic->http();
65  $this->settings = $this->dic->settings();
66  $this->navHistory = $this->dic['ilNavigationHistory'];
67  $this->help = $DIC['ilHelp'];
68  $this->uiServices = $DIC->ui();
69 
70  $this->lng->loadLanguageModule('copa');
71  $this->lng->loadLanguageModule('style');
72  $this->lng->loadLanguageModule('content');
73  $this->lng->loadLanguageModule('rep');
74 
75  if ($this->object instanceof ilObjContentPage) {
76  $this->infoScreenEnabled = (bool) ilContainer::_lookupContainerSetting(
77  $this->object->getId(),
79  '1'
80  );
81  }
82 
83  $this->pageMetricsService = new PageMetricsService(
84  new PageMetricsRepositoryImp($DIC->database()),
85  $DIC->refinery()
86  );
87  $cs = $DIC->contentStyle();
88  $this->content_style_gui = $cs->gui();
89  if (is_object($this->object)) {
90  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
91  }
92 
93  $this->in_page_editor_style_context = $this->http->wrapper()->query()->has(
94  self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT
95  );
96  $this->ctrl->saveParameterByClass(ilObjectContentStyleSettingsGUI::class, self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT);
97  }
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(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjContentPageGUI::_goto ( string  $target)
static

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

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

99  : void
100  {
101  global $DIC;
102  $main_tpl = $DIC->ui()->mainTemplate();
103 
104  $targetAttributes = explode('_', $target);
105  $refId = (int) $targetAttributes[0];
106 
107  if ($refId <= 0) {
108  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
109  }
110 
111  if ($DIC->access()->checkAccess('read', '', $refId)) {
112  $DIC->ctrl()->setTargetScript('ilias.php');
113  $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $refId);
114  $DIC->ctrl()->redirectByClass([
115  ilRepositoryGUI::class,
116  self::class,
117  ], self::UI_CMD_VIEW);
118  } elseif ($DIC->access()->checkAccess('visible', '', $refId)) {
120  } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
121  $main_tpl->setOnScreenMessage('info', sprintf(
122  $DIC->language()->txt('msg_no_perm_read_item'),
124  ), true);
125 
126  $DIC->ctrl()->setTargetScript('ilias.php');
127  $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
128  $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
129  }
130 
131  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
132  }
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 611 of file class.ilObjContentPageGUI.php.

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

Referenced by initEditCustomForm().

611  : void
612  {
613  $section = new ilFormSectionHeaderGUI();
614  $section->setTitle($this->lng->txt('rep_activation_availability'));
615  $form->addItem($section);
616 
617  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
618  $online->setInfo($this->lng->txt('copa_activation_online_info'));
619  $form->addItem($online);
620  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjContentPageGUI::addLocatorItems ( )
protected

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

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

467  : void
468  {
469  if ($this->object instanceof ilObject) {
470  $this->locator->addItem(
471  $this->object->getTitle(),
472  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
473  '',
474  $this->object->getRefId()
475  );
476  }
477  }
+ Here is the call graph for this function:

◆ addToDesk()

ilObjContentPageGUI::addToDesk ( )
protected

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

References ilDesktopItemHandling\addToDeskObject().

394  : void
395  {
396  $this->addToDeskObject();
397  }
+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

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

Referenced by setTabs().

404  : void
405  {
406  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
407  $this->navHistory->addItem(
408  $this->object->getRefId(),
409  ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
410  $this->object->getType()
411  );
412  }
413  }
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 550 of file class.ilObjContentPageGUI.php.

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

550  : void
551  {
552  $new_object->getObjectTranslation()->addLanguage(
553  $this->lng->getDefaultLanguage(),
554  $new_object->getTitle(),
555  $new_object->getDescription(),
556  true,
557  true
558  );
559  $new_object->getObjectTranslation()->save();
560 
561  $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
562  $this->ctrl->redirect($this, 'edit');
563  }
+ Here is the call graph for this function:

◆ editStyleProperties()

ilObjContentPageGUI::editStyleProperties ( )

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

649  : void
650  {
651  $this->content_style_gui->redirectToObjectSettings();
652  }

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

517  : string
518  {
519  if ($this->checkPermissionBool('read')) {
520  $this->object->trackProgress($this->user->getId());
521 
522  $this->initStyleSheets();
523 
524  $forwarder = new ilContentPagePageCommandForwarder(
525  $this->http,
526  $this->ctrl,
527  $this->tabs_gui,
528  $this->lng,
529  $this->object,
530  $this->user,
531  $this->refinery,
532  $this->content_style_domain
533  );
535 
536  return $forwarder->forward($ctrlLink);
537  }
538 
539  return '';
540  }
static http()
Fetches the global http state from ILIAS.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
final 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 622 of file class.ilObjContentPageGUI.php.

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

622  : void
623  {
624  $a_values['activation_online'] = $this->object->getOfflineStatus() === false;
626 
627  if (count($this->object->getObjectTranslation()->getLanguages()) > 1) {
628  $a_values['title'] = $this->object->getObjectTranslation()->getDefaultTitle();
629  $a_values['desc'] = $this->object->getObjectTranslation()->getDefaultDescription();
630  }
631  }
+ Here is the call graph for this function:

◆ getType()

ilObjContentPageGUI::getType ( )

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

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

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )

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

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

479  : void
480  {
481  $this->ctrl->setCmd('showSummary');
482  $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
483 
484  $this->infoScreenForward();
485  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

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

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

Referenced by infoScreen(), and setTabs().

422  : void
423  {
424  if (!$this->infoScreenEnabled) {
425  return;
426  }
427 
428  if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
429  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
430  }
431 
432  $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
433 
434  $info = new ilInfoScreenGUI($this);
435  $info->enableLearningProgress();
436  $info->enablePrivateNotes();
437  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
438 
439  $this->ctrl->forwardCommand($info);
440  }
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 573 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().

573  : void
574  {
575  $this->addAvailabilitySection($a_form);
576 
577  $presentationHeader = new ilFormSectionHeaderGUI();
578  $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
579  $a_form->addItem($presentationHeader);
580 
581  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addIcon();
582  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
583 
584  $sh = new ilFormSectionHeaderGUI();
585  $sh->setTitle($this->lng->txt('obj_features'));
586  $a_form->addItem($sh);
587 
589  $this->object->getId(),
590  $a_form,
591  [
593  ]
594  );
595 
596  if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
597  $languages = ilMDLanguageItem::_getLanguages();
598  $a_form->getItemByPostVar('title')
599  ->setInfo(
600  implode(
601  ': ',
602  [
603  $this->lng->txt('language'),
604  $languages[$this->object->getObjectTranslation()->getDefaultLanguage()]
605  ]
606  )
607  );
608  }
609  }
getItemByPostVar(string $a_post_var)
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 542 of file class.ilObjContentPageGUI.php.

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

Referenced by getContent().

542  : void
543  {
544  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
545  $this->tpl->setCurrentBlock('SyntaxStyle');
546  $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
547  $this->tpl->parseCurrentBlock();
548  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentToolbar()

ilObjContentPageGUI::populateContentToolbar ( )
protected

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

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

Referenced by view().

500  : void
501  {
502  if (!$this->user->isAnonymous() && $this->checkPermissionBool('write')) {
503  $this->lng->loadLanguageModule('cntr');
504  $this->toolbar->addComponent(
505  $this->uiServices->factory()->button()->primary(
506  $this->lng->txt('cntr_text_media_editor'),
507  $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
508  )
509  );
510  }
511  }
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:

◆ removeFromDesk()

ilObjContentPageGUI::removeFromDesk ( )
protected

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

References ilDesktopItemHandling\removeFromDeskObject().

399  : void
400  {
401  $this->removeFromDeskObject();
402  }
+ Here is the call graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

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

Referenced by setTabs().

415  : void
416  {
417  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
418  $this->addHeaderAction();
419  }
420  }
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 442 of file class.ilObjContentPageGUI.php.

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

Referenced by setTabs().

442  : void
443  {
444  if ($this->checkPermissionBool('write')) {
445  $this->tabs_gui->addSubTab(
446  self::UI_TAB_ID_SETTINGS,
447  $this->lng->txt('settings'),
448  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
449  );
450 
451  $this->tabs_gui->addSubTab(
452  self::UI_TAB_ID_STYLE,
453  $this->lng->txt('cont_style'),
454  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
455  );
456 
457  $this->tabs_gui->addSubTab(
458  self::UI_TAB_ID_I18N,
459  $this->lng->txt('obj_multilinguality'),
460  $this->ctrl->getLinkTargetByClass(ilObjectTranslationGUI::class)
461  );
462 
463  $this->tabs_gui->activateSubTab($activeTab);
464  }
465  }
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 139 of file class.ilObjContentPageGUI.php.

References ilObjectGUI\$object, ilMDEditorGUI\addObserver(), 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(), setSettingsSubTabs(), and ILIAS\Repository\user().

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

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

565  : void
566  {
567  parent::setTitleAndDescription();
568 
569  $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
570  $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
571  }
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 633 of file class.ilObjContentPageGUI.php.

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

633  : void
634  {
635  $this->object->setOfflineStatus(!(bool) $form->getInput('activation_online'));
636  $this->object->update();
637 
639  $this->object->getId(),
640  $form,
641  [
643  ]
644  );
645  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
646  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
647  }
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 487 of file class.ilObjContentPageGUI.php.

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

487  : void
488  {
489  $this->checkPermission('read');
490 
491  $this->populateContentToolbar();
492 
493  $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
494 
495  $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
496 
497  $this->tpl->setContent($this->getContent());
498  }
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 47 of file class.ilObjContentPageGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilObjContentPageGUI::$content_style_gui
protected

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

◆ $dic

readonly Container ilObjContentPageGUI::$dic
private

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

◆ $help

ilHelpGUI ilObjContentPageGUI::$help
private

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

◆ $http

GlobalHttpState ilObjContentPageGUI::$http
protected

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

◆ $in_page_editor_style_context

readonly bool ilObjContentPageGUI::$in_page_editor_style_context
private

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

◆ $infoScreenEnabled

bool ilObjContentPageGUI::$infoScreenEnabled = false
private

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

Referenced by getEditFormCustomValues().

◆ $navHistory

readonly ilNavigationHistory ilObjContentPageGUI::$navHistory
private

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

◆ $pageMetricsService

PageMetricsService ilObjContentPageGUI::$pageMetricsService
private

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

◆ $uiServices

ILIAS DI UIServices ilObjContentPageGUI::$uiServices
private

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


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