ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjContentPageGUI Class Reference

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 ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto (string $target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 setTabs ()
 
 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...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Member Functions

 addAvailabilitySection (ilPropertyFormGUI $form)
 

Private Attributes

readonly GlobalHttpState $http
 
ILIAS Style Content Object ObjectFacade $content_style_domain = null
 
readonly ILIAS Style Content GUIService $content_style_gui
 
readonly ilNavigationHistory $navHistory
 
readonly Container $dic
 
bool $infoScreenEnabled = false
 
readonly PageMetricsService $pageMetricsService
 
readonly ilHelpGUI $help
 
readonly ILIAS DI UIServices $uiServices
 
readonly bool $in_page_editor_style_context
 
readonly LOMServices $lom_services
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Data Fields inherited from ilContentPageObjectConstants
const OBJ_TYPE = 'copa'
 
const HTTP_PARAM_PAGE_EDITOR_STYLE_CONTEXT = 'page_editor_style'
 
const UI_CMD_VIEW = 'view'
 
const UI_CMD_EDIT = 'edit'
 
const UI_CMD_UPDATE = 'update'
 
const UI_CMD_COPAGE_DOWNLOAD_FILE = 'downloadFile'
 
const UI_CMD_COPAGE_DISPLAY_FULLSCREEN = 'displayMediaFullscreen'
 
const UI_CMD_COPAGE_DISPLAY_MEDIA = 'displayMedia'
 
const UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH = 'download_paragraph'
 
const UI_CMD_COPAGE_EDIT = 'edit'
 
const UI_CMD_STYLES_EDIT = 'editStyleProperties'
 
const UI_TAB_ID_CONTENT = 'content'
 
const UI_TAB_ID_INFO = 'info_short'
 
const UI_TAB_ID_SETTINGS = 'settings'
 
const UI_TAB_ID_STYLE = 'style'
 
const UI_TAB_ID_I18N = 'i18n'
 
const UI_TAB_ID_LP = 'learning_progress'
 
const UI_TAB_ID_EXPORT = 'export'
 
const UI_TAB_ID_PERMISSIONS = 'perm_settings'
 
const UI_TAB_ID_MD = 'meta_data'
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjContentPageGUI::__construct ( int  $a_id = 0,
int  $a_id_type = self::REPOSITORY_NODE_ID,
int  $a_parent_node_id = 0 
)

Definition at line 58 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().

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

Member Function Documentation

◆ _goto()

static ilObjContentPageGUI::_goto ( string  $target)
static

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

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

104  : void
105  {
106  global $DIC;
107  $main_tpl = $DIC->ui()->mainTemplate();
108 
109  $targetAttributes = explode('_', $target);
110  $refId = (int) $targetAttributes[0];
111 
112  if ($refId <= 0) {
113  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
114  }
115 
116  if ($DIC->access()->checkAccess('read', '', $refId)) {
117  $DIC->ctrl()->setTargetScript('ilias.php');
118  $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $refId);
119  $DIC->ctrl()->redirectByClass([
120  ilRepositoryGUI::class,
121  self::class,
122  ], self::UI_CMD_VIEW);
123  } elseif ($DIC->access()->checkAccess('visible', '', $refId)) {
125  } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
126  $main_tpl->setOnScreenMessage(
127  'info',
128  sprintf(
129  $DIC->language()->txt('msg_no_perm_read_item'),
131  ),
132  true
133  );
134 
135  $DIC->ctrl()->setTargetScript('ilias.php');
136  $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
137  $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
138  }
139 
140  $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
141  }
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)
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ addAvailabilitySection()

ilObjContentPageGUI::addAvailabilitySection ( ilPropertyFormGUI  $form)
private

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

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

Referenced by initEditCustomForm().

630  : void
631  {
632  $section = new ilFormSectionHeaderGUI();
633  $section->setTitle($this->lng->txt('rep_activation_availability'));
634  $form->addItem($section);
635 
636  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
637  $online->setInfo($this->lng->txt('copa_activation_online_info'));
638  $form->addItem($online);
639  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjContentPageGUI::addLocatorItems ( )
protected

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

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

484  : void
485  {
486  if ($this->object instanceof ilObject) {
487  $this->locator->addItem(
488  $this->object->getTitle(),
489  $this->ctrl->getLinkTarget($this, self::UI_CMD_VIEW),
490  '',
491  $this->object->getRefId()
492  );
493  }
494  }
+ Here is the call graph for this function:

◆ addToDesk()

ilObjContentPageGUI::addToDesk ( )
protected

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

References ilDesktopItemHandling\addToDeskObject().

407  : void
408  {
409  $this->addToDeskObject();
410  }
+ Here is the call graph for this function:

◆ addToNavigationHistory()

ilObjContentPageGUI::addToNavigationHistory ( )

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

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

Referenced by setTabs().

417  : void
418  {
419  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
420  $this->navHistory->addItem(
421  $this->object->getRefId(),
422  ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
423  $this->object->getType()
424  );
425  }
426  }
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 564 of file class.ilObjContentPageGUI.php.

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

564  : void
565  {
566  $new_object->getObjectTranslation()->addLanguage(
567  $this->lng->getDefaultLanguage(),
568  $new_object->getTitle(),
569  $new_object->getDescription(),
570  true,
571  true
572  );
573  $new_object->getObjectTranslation()->save();
574 
575  $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
576  $this->ctrl->redirect($this, 'edit');
577  }
+ Here is the call graph for this function:

◆ editStyleProperties()

ilObjContentPageGUI::editStyleProperties ( )

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

668  : void
669  {
670  $this->content_style_gui->redirectToObjectSettings();
671  }

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

531  : string
532  {
533  if ($this->checkPermissionBool('read')) {
534  $this->object->trackProgress($this->user->getId());
535 
536  $this->initStyleSheets();
537 
538  $forwarder = new ilContentPagePageCommandForwarder(
539  $this->http,
540  $this->ctrl,
541  $this->tabs_gui,
542  $this->lng,
543  $this->object,
544  $this->user,
545  $this->refinery,
546  $this->content_style_domain
547  );
549 
550  return $forwarder->forward($ctrlLink);
551  }
552 
553  return '';
554  }
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 641 of file class.ilObjContentPageGUI.php.

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

641  : void
642  {
643  if (count($this->object->getObjectTranslation()->getLanguages()) > 1) {
644  $a_values['title'] = $this->object->getObjectTranslation()->getDefaultTitle();
645  $a_values['desc'] = $this->object->getObjectTranslation()->getDefaultDescription();
646  }
647 
648  $a_values['activation_online'] = $this->object->getOfflineStatus() === false;
650  }
+ Here is the call graph for this function:

◆ getType()

ilObjContentPageGUI::getType ( )

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

143  : string
144  {
145  return self::OBJ_TYPE;
146  }

◆ infoScreen()

ilObjContentPageGUI::infoScreen ( )

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

References infoScreenForward().

496  : void
497  {
498  $this->infoScreenForward();
499  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjContentPageGUI::infoScreenForward ( )

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

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

Referenced by infoScreen(), and setTabs().

435  : void
436  {
437  if (!$this->infoScreenEnabled) {
438  return;
439  }
440 
441  if (!$this->checkPermissionBool('visible') && !$this->checkPermissionBool('read')) {
442  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
443  }
444 
445  if (strtolower($this->ctrl->getCmd() ?? '') === 'infoscreen') {
446  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
447  }
448 
449  $this->tabs_gui->activateTab(self::UI_TAB_ID_INFO);
450 
451  $info = new ilInfoScreenGUI($this);
452  $info->enableLearningProgress();
453  $info->enablePrivateNotes();
454  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
455 
456  $this->ctrl->forwardCommand($info);
457  }
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 587 of file class.ilObjContentPageGUI.php.

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

587  : void
588  {
589  $this->addAvailabilitySection($a_form);
590 
591  $presentationHeader = new ilFormSectionHeaderGUI();
592  $presentationHeader->setTitle($this->lng->txt('settings_presentation_header'));
593  $a_form->addItem($presentationHeader);
594 
595  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addIcon();
596  $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
597 
598  $sh = new ilFormSectionHeaderGUI();
599  $sh->setTitle($this->lng->txt('obj_features'));
600  $a_form->addItem($sh);
601 
603  $this->object->getId(),
604  $a_form,
605  [
607  ]
608  );
609 
610  if ($this->getCreationMode() !== true && count($this->object->getObjectTranslation()->getLanguages()) > 1) {
611  $language = '';
612  foreach ($this->lom_services->dataHelper()->getAllLanguages() as $lom_lang) {
613  if ($lom_lang->value() === $this->object->getObjectTranslation()->getDefaultLanguage()) {
614  $language = $lom_lang->presentableLabel();
615  }
616  }
617  $a_form->getItemByPostVar('title')
618  ->setInfo(
619  implode(
620  ': ',
621  [
622  $this->lng->txt('language'),
623  $language
624  ]
625  )
626  );
627  }
628  }
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 556 of file class.ilObjContentPageGUI.php.

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

Referenced by getContent().

556  : void
557  {
558  $this->content_style_gui->addCss($this->tpl, $this->object->getRefId());
559  $this->tpl->setCurrentBlock('SyntaxStyle');
560  $this->tpl->setVariable('LOCATION_SYNTAX_STYLESHEET', ilObjStyleSheet::getSyntaxStylePath());
561  $this->tpl->parseCurrentBlock();
562  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateContentToolbar()

ilObjContentPageGUI::populateContentToolbar ( )
protected

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

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

Referenced by view().

514  : void
515  {
516  if (!$this->user->isAnonymous() && $this->checkPermissionBool('write')) {
517  $this->lng->loadLanguageModule('cntr');
518  $this->toolbar->addComponent(
519  $this->uiServices->factory()->button()->primary(
520  $this->lng->txt('cntr_text_media_editor'),
521  $this->ctrl->getLinkTargetByClass(ilContentPagePageGUI::class, 'edit')
522  )
523  );
524  }
525  }
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 412 of file class.ilObjContentPageGUI.php.

References ilDesktopItemHandling\removeFromDeskObject().

412  : void
413  {
414  $this->removeFromDeskObject();
415  }
+ Here is the call graph for this function:

◆ renderHeaderActions()

ilObjContentPageGUI::renderHeaderActions ( )

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

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

Referenced by setTabs().

428  : void
429  {
430  if (!$this->getCreationMode() && $this->checkPermissionBool('read')) {
431  $this->addHeaderAction();
432  }
433  }
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 459 of file class.ilObjContentPageGUI.php.

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

Referenced by setTabs().

459  : void
460  {
461  if ($this->checkPermissionBool('write')) {
462  $this->tabs_gui->addSubTab(
463  self::UI_TAB_ID_SETTINGS,
464  $this->lng->txt('general'),
465  $this->ctrl->getLinkTarget($this, self::UI_CMD_EDIT)
466  );
467 
468  $this->tabs_gui->addSubTab(
469  self::UI_TAB_ID_STYLE,
470  $this->lng->txt('cont_style'),
471  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
472  );
473 
474  $this->tabs_gui->addSubTab(
475  self::UI_TAB_ID_I18N,
476  $this->lng->txt('obj_multilinguality'),
477  $this->ctrl->getLinkTargetByClass(ilObjectTranslationGUI::class)
478  );
479 
480  $this->tabs_gui->activateSubTab($activeTab);
481  }
482  }
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 148 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, null, ILIAS\Repository\object(), ILIAS\ContentPage\PageMetrics\Event\PageUpdatedEvent\page(), ilObject2GUI\prepareOutput(), ILIAS\Repository\refinery(), renderHeaderActions(), setSettingsSubTabs(), and ILIAS\Repository\user().

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

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

579  : void
580  {
581  parent::setTitleAndDescription();
582 
583  $icon = ilObject::_getIcon($this->object->getId(), 'big', $this->object->getType());
584  $this->tpl->setTitleIcon($icon, $this->lng->txt('obj_' . $this->object->getType()));
585  }
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 652 of file class.ilObjContentPageGUI.php.

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

652  : void
653  {
654  $this->object->setOfflineStatus(!(bool) $form->getInput('activation_online'));
655  $this->object->update();
656 
658  $this->object->getId(),
659  $form,
660  [
662  ]
663  );
664  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
665  $this->object_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
666  }
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 501 of file class.ilObjContentPageGUI.php.

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

501  : void
502  {
503  $this->checkPermission('read');
504 
505  $this->populateContentToolbar();
506 
507  $this->tabs_gui->activateTab(self::UI_TAB_ID_CONTENT);
508 
509  $this->tpl->setPermanentLink($this->object->getType(), $this->object->getRefId(), '', '_top');
510 
511  $this->tpl->setContent($this->getContent());
512  }
getContent(string $ctrlLink='')
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjContentPageGUI::$content_style_domain = null
private

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

◆ $content_style_gui

readonly ILIAS Style Content GUIService ilObjContentPageGUI::$content_style_gui
private

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

readonly ilHelpGUI ilObjContentPageGUI::$help
private

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

◆ $http

readonly GlobalHttpState ilObjContentPageGUI::$http
private

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

◆ $lom_services

readonly LOMServices ilObjContentPageGUI::$lom_services
private

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

◆ $navHistory

readonly ilNavigationHistory ilObjContentPageGUI::$navHistory
private

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

◆ $pageMetricsService

readonly PageMetricsService ilObjContentPageGUI::$pageMetricsService
private

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

◆ $uiServices

readonly 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: