ILIAS  release_7 Revision v7.30-3-g800a261c036
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: ilObjectCustomIconConfigurationGUI ilObjContentPageGUI: ilObjStyleSheetGUI ilObjContentPageGUI: ilObjectTranslationGUI ilObjContentPageGUI: ilPageMultiLangGUI. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 getType ()
 
 setTabs ()
 
 executeCommand ()
 
 addToNavigationHistory ()
 
 renderHeaderActions ()
 
 infoScreenForward ()
 
 addLocatorItems ()
 
 infoScreen ()
 
 view ()
 Shows the content of the object. More...
 
 getContent (string $ctrlLink='')
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 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 ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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 $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 setSettingsSubTabs (string $activeTab)
 Sub tab configuration of the settings area. More...
 
 populateContentToolbar ()
 
 initStyleSheets ()
 
 afterSave (ilObject $a_new_object)
 
 setTitleAndDescription ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $a_form)
 
 editStyleProperties ()
 
 buildStylePropertiesForm ()
 
 createStyle ()
 
 editStyle ()
 
 deleteStyle ()
 
 saveStyleSettings ()
 
- 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 ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $request
 
 $ctrl
 
 $access
 
 $settings
 
 $tabs
 
 $user
 
 $obj_service
 
 $navHistory
 
 $error
 
 $dic
 
 $infoScreenEnabled = false
 
 $help
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Private Attributes

 $pageMetricsService
 
 $uiServices
 
 $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 COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
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_EDIT = 'edit'
 
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_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_ICON = 'icon'
 
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 (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilContainer\_lookupContainerSetting(), help(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, settings(), and user().

63  {
64  global $DIC;
65 
66  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
67 
68  $this->dic = $DIC;
69  $this->request = $this->dic->http()->request();
70  $this->settings = $this->dic->settings();
71  $this->access = $this->dic->access();
72  $this->ctrl = $this->dic->ctrl();
73  $this->tabs = $this->dic->tabs();
74  $this->user = $this->dic->user();
75  $this->obj_service = $this->dic->object();
76  $this->navHistory = $this->dic['ilNavigationHistory'];
77  $this->error = $this->dic['ilErr'];
78  $this->help = $DIC['ilHelp'];
79  $this->uiServices = $DIC->ui();
80 
81  $this->lng->loadLanguageModule('copa');
82  $this->lng->loadLanguageModule('style');
83  $this->lng->loadLanguageModule('content');
84 
85  if ($this->object instanceof ilObjContentPage) {
86  $this->infoScreenEnabled = ilContainer::_lookupContainerSetting(
87  $this->object->getId(),
89  true
90  );
91  }
92 
93  $this->in_page_editor_style_context = (
94  $this->dic->http()->request()->getQueryParams()[self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT] ?? null
95  );
96 
97  $this->pageMetricsService = new PageMetricsService(
98  new PageMetricsRepositoryImp($DIC->database()),
99  $DIC->refinery()
100  );
101 
102  $this->ctrl->saveParameter($this, self::HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT);
103  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
help()
Definition: help.php:2
global $DIC
Definition: goto.php:24
Class ilObjContentPage.
__construct(Container $dic, ilPlugin $plugin)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjContentPageGUI::_goto ( string  $target)
static
Parameters
string$target

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

References $DIC, $refId, ilObjectGUI\_gotoRepositoryNode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ROOT_FOLDER_ID, and ilUtil\sendInfo().

108  : void
109  {
110  global $DIC;
111 
112  $targetAttributes = explode('_', $target);
113  $refId = (int) $targetAttributes[0];
114 
115  if ((int) $refId <= 0) {
116  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
117  }
118 
119  if ($DIC->access()->checkAccess('read', '', $refId)) {
120  $DIC->ctrl()->setTargetScript('ilias.php');
121  $DIC->ctrl()->initBaseClass('ilRepositoryGUI');
122  if (isset($DIC->http()->request()->getQueryParams()['gotolp'])) {
123  $DIC->ctrl()->setParameterByClass(__CLASS__, 'gotolp', 1);
124  }
125  $DIC->ctrl()->setParameterByClass(__CLASS__, 'ref_id', $refId);
126  $DIC->ctrl()->redirectByClass([
127  'ilRepositoryGUI',
128  __CLASS__,
129  ], self::UI_CMD_VIEW);
130  } elseif ($DIC->access()->checkAccess("visible", "", $target)) {
131  ilObjectGUI::_gotoRepositoryNode($target, "infoScreen");
132  } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
133  ilUtil::sendInfo(sprintf(
134  $DIC->language()->txt('msg_no_perm_read_item'),
136  ), true);
137 
138  $DIC->ctrl()->setTargetScript('ilias.php');
139  $DIC->ctrl()->initBaseClass('ilRepositoryGUI');
140  $DIC->ctrl()->setParameterByClass('ilRepositoryGUI', 'ref_id', ROOT_FOLDER_ID);
141  $DIC->ctrl()->redirectByClass('ilRepositoryGUI');
142  }
143 
144  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
145  }
const ROOT_FOLDER_ID
Definition: constants.php:30
static _lookupTitle($a_id)
lookup object title
$refId
Definition: xapitoken.php:40
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjContentPageGUI::addLocatorItems ( )

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

513  {
514  if ($this->object instanceof ilObject) {
515  $this->locator->addItem(
516  $this->object->getTitle(),
517  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
518  '',
519  $this->object->getRefId()
520  );
521  }
522  }

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

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

Referenced by executeCommand().

427  : void
428  {
429  if (!$this->getCreationMode()) {
430  if ($this->checkPermissionBool('read')) {
431  $this->navHistory->addItem(
432  $this->object->getRefId(),
433  ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
434  $this->object->getType()
435  );
436  }
437  }
438  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterSave()

ilObjContentPageGUI::afterSave ( ilObject  $a_new_object)
protected

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

References ilObject\getDescription(), and ilObject\getTitle().

611  {
612  $a_new_object->getObjectTranslation()->addLanguage(
613  $this->lng->getDefaultLanguage(),
614  $a_new_object->getTitle(),
615  $a_new_object->getDescription(),
616  true,
617  true
618  );
619  $a_new_object->getObjectTranslation()->save();
620 
621  ilUtil::sendSuccess($this->lng->txt('object_added'), true);
622  $this->ctrl->redirect($this, 'edit');
623  }
getTitle()
get object title public
getDescription()
get object description
+ Here is the call graph for this function:

◆ buildStylePropertiesForm()

ilObjContentPageGUI::buildStylePropertiesForm ( )
protected
Returns
ilPropertyFormGUI

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

References $_GET, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), settings(), and ilNonEditableValueGUI\setValue().

Referenced by editStyleProperties().

740  {
741  $form = new ilPropertyFormGUI();
742 
743  $fixedStyle = $this->settings->get('fixed_content_style_id');
744  $defaultStyle = $this->settings->get('default_content_style_id');
745  $styleId = $this->object->getStyleSheetId();
746 
747  if ($fixedStyle > 0) {
748  $st = new ilNonEditableValueGUI($this->lng->txt("cont_current_style"));
749  $st->setValue(
750  ilObject::_lookupTitle($fixedStyle) . " (" . $this->lng->txt("global_fixed") . ")"
751  );
752  $form->addItem($st);
753  } else {
755  true,
756  false,
757  (int) $_GET["ref_id"]
758  );
759 
760  if ($defaultStyle > 0) {
761  $st_styles[0] = ilObject::_lookupTitle($defaultStyle) . ' (' . $this->lng->txt('default') . ')';
762  } else {
763  $st_styles[0] = $this->lng->txt('default');
764  }
765  ksort($st_styles);
766 
767  if ($styleId > 0) {
768  if (!ilObjStyleSheet::_lookupStandard($styleId)) {
769  $st = new ilNonEditableValueGUI($this->lng->txt('cont_current_style'));
770  $st->setValue(ilObject::_lookupTitle($styleId));
771  $form->addItem($st);
772 
773  $form->addCommandButton('editStyle', $this->lng->txt('cont_edit_style'));
774  $form->addCommandButton('deleteStyle', $this->lng->txt('cont_delete_style'));
775  }
776  }
777 
778  if ($styleId <= 0 || ilObjStyleSheet::_lookupStandard($styleId)) {
779  $style_sel = new ilSelectInputGUI($this->lng->txt('cont_current_style'), 'style_id');
780  $style_sel->setOptions($st_styles);
781  $style_sel->setValue($styleId);
782  $form->addItem($style_sel);
783  $form->addCommandButton('saveStyleSettings', $this->lng->txt('save'));
784  $form->addCommandButton('createStyle', $this->lng->txt('sty_create_ind_style'));
785  }
786  }
787 
788  $form->setTitle($this->lng->txt("cont_style"));
789  $form->setFormAction($this->ctrl->getFormAction($this));
790 
791  return $form;
792  }
settings()
Definition: settings.php:2
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
This class represents a non editable value in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createStyle()

ilObjContentPageGUI::createStyle ( )
protected

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

794  : void
795  {
796  $this->ctrl->redirectByClass('ilobjstylesheetgui', 'create');
797  }

◆ deleteStyle()

ilObjContentPageGUI::deleteStyle ( )
protected

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

804  : void
805  {
806  $this->ctrl->redirectByClass('ilobjstylesheetgui', 'delete');
807  }

◆ editStyle()

ilObjContentPageGUI::editStyle ( )
protected

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

799  : void
800  {
801  $this->ctrl->redirectByClass('ilobjstylesheetgui', 'edit');
802  }

◆ editStyleProperties()

ilObjContentPageGUI::editStyleProperties ( )
protected
Exceptions
ilObjectException

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

References buildStylePropertiesForm(), ilObject2GUI\checkPermission(), ilContentPagePageCommandForwarder\PRESENTATION_MODE_PREVIEW, setSettingsSubTabs(), and user().

704  : void
705  {
706  $this->checkPermission('write');
707 
708  if (!$this->in_page_editor_style_context) {
709  $this->tabs->activateTab(self::UI_TAB_ID_SETTINGS);
710  $this->setSettingsSubTabs(self::UI_TAB_ID_STYLE);
711  }
712 
713  $form = $this->buildStylePropertiesForm();
714 
715  if ($this->in_page_editor_style_context) {
716  $this->tabs->setBackTarget(
717  $this->lng->txt('back'),
718  $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
719  );
720 
721  $forwarder = new ilContentPagePageCommandForwarder(
722  $this->request,
723  $this->ctrl,
724  $this->tabs,
725  $this->lng,
726  $this->object,
727  $this->user
728  );
729  $forwarder->setPresentationMode(ilContentPagePageCommandForwarder::PRESENTATION_MODE_PREVIEW);
730  $forwarder->forward('');
731  $this->tabs->setTabActive('obj_sty');
732  }
733  $this->tpl->setContent($form->getHTML());
734  }
Class ilContentPagePageCommandForwarder.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
user()
Definition: user.php:4
setSettingsSubTabs(string $activeTab)
Sub tab configuration of the settings area.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjContentPageGUI::executeCommand ( )

Exceptions
ilObjectException
ilCtrlException
ilException

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

References $_GET, $ret, addToNavigationHistory(), ilLearningProgressAccess\checkAccess(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ilObjStyleSheet\getContentStylePath(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjStyleSheet\getSyntaxStylePath(), infoScreenForward(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\omitLocator(), ILIAS\ContentPage\PageMetrics\Event\PageUpdatedEvent\page(), ilObject2GUI\prepareOutput(), renderHeaderActions(), ilObject2GUI\setLocator(), setSettingsSubTabs(), settings(), and user().

222  {
223  $nextClass = $this->ctrl->getNextClass($this);
224  $cmd = $this->ctrl->getCmd(self::UI_CMD_VIEW);
225 
226  $this->addToNavigationHistory();
227 
228  if (
229  !$this->in_page_editor_style_context &&
230  strtolower($nextClass) !== strtolower(ilObjStyleSheetGUI::class) &&
231  (
232  strtolower($cmd) !== strtolower(self::UI_CMD_EDIT) ||
233  strtolower($nextClass) !== strtolower(ilContentPagePageGUI::class)
234  )
235  ) {
236  $this->renderHeaderActions();
237  }
238 
239  switch (strtolower($nextClass)) {
240  case 'ilobjecttranslationgui':
241  $this->checkPermission('write');
242 
243  $this->prepareOutput();
244  $this->tabs->activateTab(self::UI_TAB_ID_SETTINGS);
245  $this->setSettingsSubTabs(self::UI_TAB_ID_I18N);
246 
247  $transgui = new ilObjectTranslationGUI($this);
248  $this->ctrl->forwardCommand($transgui);
249  break;
250 
251  case 'ilobjstylesheetgui':
252  $this->checkPermission('write');
253 
254  $this->setLocator();
255 
256  $this->ctrl->setReturn($this, 'editStyleProperties');
257  $style_gui = new ilObjStyleSheetGUI(
258  '',
259  $this->object->getStyleSheetId(),
260  false,
261  false
262  );
263  $style_gui->omitLocator();
264  if ($cmd === 'create' || $_GET['new_type'] === 'sty') {
265  $style_gui->setCreationMode(true);
266  }
267 
268  if ($cmd === 'confirmedDelete') {
269  $this->object->setStyleSheetId(0);
270  $this->object->update();
271  }
272 
273  $ret = $this->ctrl->forwardCommand($style_gui);
274 
275  if ($cmd === 'save' || $cmd === 'copyStyle' || $cmd === 'importStyle') {
276  $styleId = $ret;
277  $this->object->setStyleSheetId($styleId);
278  $this->object->update();
279  $this->ctrl->redirectByClass('ilobjstylesheetgui', 'edit');
280  }
281  break;
282 
283  case 'ilcontentpagepagegui':
284  $isMediaRequest = in_array(strtolower($cmd), array_map('strtolower', [
285  self::UI_CMD_COPAGE_DOWNLOAD_FILE,
286  self::UI_CMD_COPAGE_DISPLAY_FULLSCREEN,
287  self::UI_CMD_COPAGE_DISPLAY_MEDIA,
288  self::UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH,
289  ]), true);
290  if ($isMediaRequest) {
291  if (!$this->checkPermissionBool('read')) {
292  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
293  }
294  } elseif (!$this->checkPermissionBool('write') || $this->user->isAnonymous()) {
295  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
296  }
297 
298  $this->prepareOutput();
299 
300  $this->tpl->setVariable(
301  'LOCATION_CONTENT_STYLESHEET',
302  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
303  );
304  $this->tpl->setCurrentBlock('SyntaxStyle');
305  $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
306  $this->tpl->parseCurrentBlock();
307 
308  $forwarder = new ilContentPagePageCommandForwarder(
309  $this->request,
310  $this->ctrl,
311  $this->tabs,
312  $this->lng,
313  $this->object,
314  $this->user
315  );
316  $forwarder->setIsMediaRequest($isMediaRequest);
317 
318  $forwarder->addUpdateListener(function (PageUpdatedEvent $event) : void {
319  $this->pageMetricsService->store(
321  (int) $this->object->getId(),
322  $event->page()->getLanguage()
323  )
324  );
325  });
326 
327  $pageContent = $forwarder->forward();
328  if (strlen($pageContent) > 0) {
329  $this->tpl->setContent($pageContent);
330  }
331  break;
332 
333  case 'ilinfoscreengui':
334  if (!$this->infoScreenEnabled) {
335  return null;
336  }
337  $this->prepareOutput();
338 
339  $this->infoScreenForward();
340  break;
341 
342  case 'ilcommonactiondispatchergui':
343  $this->prepareOutput();
344  $this->ctrl->forwardCommand(ilCommonActionDispatcherGUI::getInstanceFromAjaxCall());
345  break;
346 
347  case 'ilpermissiongui':
348  $this->checkPermission('edit_permission');
349 
350  $this->prepareOutput();
351  $this->tabs->activateTab(self::UI_TAB_ID_PERMISSIONS);
352 
353  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
354  break;
355 
356  case 'illearningprogressgui':
357  if (!ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
358  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
359  }
360 
361  $this->prepareOutput();
362  $this->tabs->activateTab(self::UI_TAB_ID_LP);
363 
364  $this->ctrl->forwardCommand(new ilLearningProgressGUI(
366  $this->object->getRefId(),
367  isset(
368  $this->request->getQueryParams()['user_id']) &&
369  is_numeric(
370  $this->request->getQueryParams()['user_id']
371  ) ?
372  (int) $this->request->getQueryParams()['user_id'] :
373  $this->user->getId()
374  ));
375  break;
376 
377  case 'ilexportgui':
378  $this->checkPermission('write');
379 
380  $this->prepareOutput();
381  $this->tabs->activateTab(self::UI_TAB_ID_EXPORT);
382 
383  $gui = new ilExportGUI($this);
384  $gui->addFormat('xml');
385  $this->ctrl->forwardCommand($gui);
386  break;
387 
388  case 'ilobjectcustomiconconfigurationgui':
389  if (!$this->checkPermissionBool('write') || !$this->settings->get('custom_icons')) {
390  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
391  }
392 
393  $this->prepareOutput();
394  $this->tabs->activateTab(self::UI_TAB_ID_SETTINGS);
395  $this->setSettingsSubTabs(self::UI_TAB_ID_ICON);
396 
397  require_once 'Services/Object/Icon/classes/class.ilObjectCustomIconConfigurationGUI.php';
398  $gui = new ilObjectCustomIconConfigurationGUI($this->dic, $this, $this->object);
399  $this->ctrl->forwardCommand($gui);
400  break;
401 
402  case 'ilobjectcopygui':
403  $this->tpl->loadStandardTemplate();
404 
405  $gui = new ilObjectCopyGUI($this);
406  $gui->setType(self::OBJ_TYPE);
407 
408  $this->ctrl->forwardCommand($gui);
409  break;
410 
411  default:
412  switch (true) {
413  case in_array(strtolower($cmd), array_map('strtolower', [self::UI_CMD_EDIT, self::UI_CMD_UPDATE])):
415  break;
416  }
417 
418  if (in_array(strtolower($cmd), array_map('strtolower', ['addToDesk', 'removeFromDesk']))) {
419  $this->ctrl->setCmd($cmd . 'Object');
420  }
421 
422  return parent::executeCommand();
423  }
424  return null;
425  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
setLocator()
set Locator
Class ilContentPagePageCommandForwarder.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
settings()
Definition: settings.php:2
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
GUI class for the workflow of copying objects.
$_GET["client_id"]
user()
Definition: user.php:4
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
omitLocator($a_omit=true)
static getSyntaxStylePath()
get syntax style path
Class ilObjStyleSheetGUI.
$ret
Definition: parser.php:6
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjUserTrackingGUI.
setSettingsSubTabs(string $activeTab)
Sub tab configuration of the settings area.
Class ilObjectCustomIconConfigurationGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

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

References ilObject2GUI\checkPermissionBool(), initStyleSheets(), ilContentPagePageCommandForwarder\PRESENTATION_MODE_PRESENTATION, and user().

Referenced by view().

573  : string
574  {
575  if ($this->checkPermissionBool('read')) {
576  $this->object->trackProgress((int) $this->user->getId());
577 
578  $this->initStyleSheets();
579 
580  $forwarder = new ilContentPagePageCommandForwarder(
581  $this->request,
582  $this->ctrl,
583  $this->tabs,
584  $this->lng,
585  $this->object,
586  $this->user
587  );
589 
590  return $forwarder->forward($ctrlLink);
591  }
592 
593  return '';
594  }
Class ilContentPagePageCommandForwarder.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
user()
Definition: user.php:4
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 676 of file class.ilObjContentPageGUI.php.

References $infoScreenEnabled, and ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY.

677  {
679 
680  if (count($this->object->getObjectTranslation()->getLanguages()) > 1) {
681  $a_values['title'] = $this->object->getObjectTranslation()->getDefaultTitle();
682  $a_values['desc'] = $this->object->getObjectTranslation()->getDefaultDescription();
683  }
684  }

◆ getType()

ilObjContentPageGUI::getType ( )

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

151  {
152  return self::OBJ_TYPE;
153  }

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )
Exceptions
ilCtrlException

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

References infoScreenForward().

528  : void
529  {
530  $this->ctrl->setCmd('showSummary');
531  $this->ctrl->setCmdClass('ilinfoscreengui');
532 
533  $this->infoScreenForward();
534  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )
Exceptions
ilCtrlException

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

References ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), and infoScreen().

452  : void
453  {
454  if (!$this->infoScreenEnabled) {
455  return;
456  }
457 
458  if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
459  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
460  }
461 
462  $this->tabs->activateTab(self::UI_TAB_ID_INFO);
463 
464  $info = new ilInfoScreenGUI($this);
465  $info->enableLearningProgress(true);
466  $info->enablePrivateNotes();
467  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
468 
469  $this->ctrl->forwardCommand($info);
470  }
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ 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 639 of file class.ilObjContentPageGUI.php.

References ilMDLanguageItem\_getLanguages(), ilPropertyFormGUI\addItem(), ilObject2GUI\getCreationMode(), ilPropertyFormGUI\getItemByPostVar(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, and ilObjectServiceSettingsGUI\initServiceSettingsForm().

640  {
641  $sh = new ilFormSectionHeaderGUI();
642  $sh->setTitle($this->lng->txt('obj_features'));
643  $a_form->addItem($sh);
644 
646  $this->object->getId(),
647  $a_form,
648  [
650  ]
651  );
652 
653  $presentationHeader = new ilFormSectionHeaderGUI();
654  $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
655  $a_form->addItem($presentationHeader);
656  $this->obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
657 
658  if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
659  $languages = ilMDLanguageItem::_getLanguages();
660  $a_form->getItemByPostVar('title')
661  ->setInfo(
662  implode(
663  ': ',
664  [
665  $this->lng->txt('language'),
666  $languages[$this->object->getObjectTranslation()->getDefaultLanguage()]
667  ]
668  )
669  );
670  }
671  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
+ Here is the call graph for this function:

◆ initStyleSheets()

ilObjContentPageGUI::initStyleSheets ( )
protected

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

References ilObjStyleSheet\getContentStylePath(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by getContent().

596  : void
597  {
598  $this->tpl->setVariable(
599  'LOCATION_CONTENT_STYLESHEET',
600  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
601  );
602  $this->tpl->setCurrentBlock('SyntaxStyle');
603  $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
604  $this->tpl->parseCurrentBlock();
605  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static getSyntaxStylePath()
get syntax style path
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentToolbar()

ilObjContentPageGUI::populateContentToolbar ( )
protected

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

References ilObject2GUI\checkPermissionBool(), and user().

Referenced by view().

555  : void
556  {
557  if (!$this->user->isAnonymous() && $this->checkPermissionBool('write')) {
558  $this->lng->loadLanguageModule('cntr');
559  $this->toolbar->addComponent(
560  $this->uiServices->factory()->button()->primary(
561  $this->lng->txt('cntr_text_media_editor'),
562  $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
563  )
564  );
565  }
566  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
user()
Definition: user.php:4
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

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

Referenced by executeCommand().

440  : void
441  {
442  if (!$this->getCreationMode()) {
443  if ($this->checkPermissionBool('read')) {
444  $this->addHeaderAction();
445  }
446  }
447  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
addHeaderAction()
Add header action menu.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStyleSettings()

ilObjContentPageGUI::saveStyleSettings ( )
protected
Exceptions
ilObjectException

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

References $_POST, ilObjStyleSheet\_lookupStandard(), ilObject2GUI\checkPermission(), settings(), and ilUtil\stripSlashes().

812  : void
813  {
814  $this->checkPermission('write');
815 
816  if (
817  $this->settings->get('fixed_content_style_id') <= 0 &&
818  (
820  $this->object->getStyleSheetId()
821  ) ||
822  $this->object->getStyleSheetId() == 0
823  )
824  ) {
825  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST['style_id']));
826  $this->object->update();
827  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
828  }
829 
830  $this->ctrl->redirect($this, self::UI_CMD_STYLES_EDIT);
831  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
settings()
Definition: settings.php:2
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjContentPageGUI::setSettingsSubTabs ( string  $activeTab)
protected

Sub tab configuration of the settings area.

Parameters
string$activeTab

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

References ilObject2GUI\checkPermissionBool(), and settings().

Referenced by editStyleProperties(), and executeCommand().

476  : void
477  {
478  if ($this->checkPermissionBool('write')) {
479  $this->tabs->addSubTab(
480  self::UI_TAB_ID_SETTINGS,
481  $this->lng->txt('settings'),
482  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
483  );
484 
485  if ($this->settings->get('custom_icons')) {
486  $this->tabs_gui->addSubTab(
487  self::UI_TAB_ID_ICON,
488  $this->lng->txt('icon_settings'),
489  $this->ctrl->getLinkTargetByClass('ilObjectCustomIconConfigurationGUI')
490  );
491  }
492 
493  $this->tabs_gui->addSubTab(
494  self::UI_TAB_ID_STYLE,
495  $this->lng->txt('cont_style'),
496  $this->ctrl->getLinkTarget($this, 'editStyleProperties')
497  );
498 
499  $this->tabs_gui->addSubTab(
500  self::UI_TAB_ID_I18N,
501  $this->lng->txt('obj_multilinguality'),
502  $this->ctrl->getLinkTargetByClass(ilObjectTranslationGUI::class)
503  );
504 
505  $this->tabs->activateSubTab($activeTab);
506  }
507  }
settings()
Definition: settings.php:2
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjContentPageGUI::setTabs ( )

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

References ilLearningProgressAccess\checkAccess(), ilObject2GUI\checkPermissionBool(), and help().

159  {
160  $this->help->setScreenIdComponent($this->object->getType());
161 
162  if ($this->in_page_editor_style_context) {
163  return;
164  }
165 
166  if ($this->checkPermissionBool('read')) {
167  $this->tabs->addTab(
168  self::UI_TAB_ID_CONTENT,
169  $this->lng->txt('content'),
170  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW)
171  );
172  }
173 
174  if ($this->infoScreenEnabled && ($this->checkPermissionBool('visible') || $this->checkPermissionBool('read'))) {
175  $this->tabs->addTab(
176  self::UI_TAB_ID_INFO,
177  $this->lng->txt('info_short'),
178  $this->ctrl->getLinkTargetByClass('ilinfoscreengui', 'showSummary')
179  );
180  }
181 
182  if ($this->checkPermissionBool('write')) {
183  $this->tabs->addTab(
184  self::UI_TAB_ID_SETTINGS,
185  $this->lng->txt('settings'),
186  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
187  );
188  }
189 
190  if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
191  $this->tabs->addTab(
192  self::UI_TAB_ID_LP,
193  $this->lng->txt('learning_progress'),
194  $this->ctrl->getLinkTargetByClass('illearningprogressgui')
195  );
196  }
197 
198  if ($this->checkPermissionBool('write')) {
199  $this->tabs->addTab(
200  self::UI_TAB_ID_EXPORT,
201  $this->lng->txt('export'),
202  $this->ctrl->getLinkTargetByClass('ilexportgui')
203  );
204  }
205 
206  if ($this->checkPermissionBool('edit_permission')) {
207  $this->tabs->addTab(
208  self::UI_TAB_ID_PERMISSIONS,
209  $this->lng->txt('perm_settings'),
210  $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm')
211  );
212  }
213  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
help()
Definition: help.php:2
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjContentPageGUI::setTitleAndDescription ( )
protected

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

References ilObject\_getIcon().

629  {
630  parent::setTitleAndDescription();
631 
632  $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
633  $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
634  }
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
+ Here is the call graph for this function:

◆ updateCustom()

ilObjContentPageGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

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

References ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

690  {
692  $this->object->getId(),
693  $a_form,
694  [
696  ]
697  );
698  $this->obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
699  }
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
+ Here is the call graph for this function:

◆ view()

ilObjContentPageGUI::view ( )

Shows the content of the object.

Exceptions
ilException
ilObjectException

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

References ilObject2GUI\checkPermission(), getContent(), and populateContentToolbar().

543  {
544  $this->checkPermission('read');
545 
546  $this->populateContentToolbar();
547 
548  $this->tabs->activateTab(self::UI_TAB_ID_CONTENT);
549 
550  $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
551 
552  $this->tpl->setContent($this->getContent());
553  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
getContent(string $ctrlLink='')
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilObjContentPageGUI::$access
protected

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

◆ $ctrl

ilObjContentPageGUI::$ctrl
protected

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

◆ $dic

ilObjContentPageGUI::$dic
protected

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

◆ $error

ilObjContentPageGUI::$error
protected

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

◆ $help

ilObjContentPageGUI::$help
protected

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

◆ $in_page_editor_style_context

ilObjContentPageGUI::$in_page_editor_style_context = false
private

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

◆ $infoScreenEnabled

ilObjContentPageGUI::$infoScreenEnabled = false
protected

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

Referenced by getEditFormCustomValues().

◆ $navHistory

ilObjContentPageGUI::$navHistory
protected

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

◆ $obj_service

ilObjContentPageGUI::$obj_service
protected

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

◆ $pageMetricsService

ilObjContentPageGUI::$pageMetricsService
private

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

◆ $request

ilObjContentPageGUI::$request
protected

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

◆ $settings

ilObjContentPageGUI::$settings
protected

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

◆ $tabs

ilObjContentPageGUI::$tabs
protected

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

◆ $uiServices

ilObjContentPageGUI::$uiServices
private

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

◆ $user

ilObjContentPageGUI::$user
protected

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


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