ILIAS  release_8 Revision v8.24
ilObjPortfolioTemplateGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjPortfolioTemplateGUI:
+ Collaboration diagram for ilObjPortfolioTemplateGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 Functions that must be overwritten. More...
 
 executeCommand ()
 execute command More...
 
 infoScreen ()
 this one is called from the info button in the repository More...
 
 infoScreenForward ()
 
 getPageGUIClassName ()
 
 preview (bool $a_return=false, $a_content=false, bool $a_show_notes=true)
 
 createFromTemplateOld ()
 
 createFromTemplate ()
 
- Public Member Functions inherited from ilObjPortfolioBaseGUI
 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 setAdditional (array $a_additional)
 Set Additonal Information (used in public profile?) More...
 
 getAdditional ()
 
 setPermaLink (int $a_obj_id, string $a_type)
 Set custom perma link (used in public profile?) More...
 
 getPageGUIClassName ()
 
 view ()
 Show list of portfolio pages. More...
 
 initPageForm (string $a_mode="create")
 Init portfolio page form. More...
 
 savePage ()
 Create new portfolio page. More...
 
 savePortfolioPagesOrdering ()
 Save ordering of portfolio pages. More...
 
 confirmPortfolioPageDeletion ()
 
 deletePortfolioPages ()
 
 export (bool $a_with_comments=false)
 
 exportWithComments ()
 
 copyPageForm (ilPropertyFormGUI $a_form=null)
 Select target portfolio for page(s) copy. More...
 
 copyPage ()
 
 initCopyPageForm ()
 
 setContentStyleSheet (ilGlobalTemplateInterface $a_tpl=null)
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 setTabs ()
 create tabs (repository/workspace switch) More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 Get portfolio template page instance. More...
 
 getPageGUIInstance (int $a_page_id)
 Get portfolio template page gui instance. More...
 
 initCopyPageFormOptions (ilPropertyFormGUI $a_form)
 
 initBlogForm ()
 Init blog template page form. More...
 
 saveBlog ()
 
- Protected Member Functions inherited from ilObjPortfolioBaseGUI
 addLocatorItems ()
 Functions to be overwritten. More...
 
 determinePageCall ()
 
 handlePageCall (string $a_cmd)
 
 setSettingsSubTabs (string $a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 
 getPageGUIInstance (int $a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 addBlog ()
 Show portfolio blog page creation form. More...
 
 initBlogForm ()
 
 saveBlog ()
 
 showEditButton (int $page_id)
 
 initCopyPageFormOptions (ilPropertyFormGUI $a_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="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilNavigationHistory $nav_history
 
ilHelpGUI $help
 
ilTabsGUI $tabs
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
StandardGUIRequest $port_request
 
ilHelpGUI $help
 
int $user_id = 0
 
array $additional = array()
 
array $perma_link = []
 
int $page_id = 0
 
string $page_mode
 
int $requested_ppage
 
int $requested_user_page
 
string $requested_back_url = ""
 
ILIAS DI UIServices $ui
 
ILIAS HTTP Services $http
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjPortfolioBaseGUI
static renderFullscreenHeader (ilObjPortfolioBase $a_portfolio, ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
 Render banner, user name. More...
 
- 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)
 
- 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
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Portfolio template view gui class

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

@ilCtrl_Calls ilObjPortfolioTemplateGUI: ilPortfolioTemplatePageGUI, ilPageObjectGUI, ilNoteGUI @ilCtrl_Calls ilObjPortfolioTemplateGUI: ilObjectCopyGUI, ilInfoScreenGUI, ilCommonActionDispatcherGUI @ilCtrl_Calls ilObjPortfolioTemplateGUI: ilPermissionGUI, ilExportGUI, ilObjectContentStyleSettingsGUI @ilCtrl_Calls ilObjPortfolioTemplateGUI: ilObjectMetaDataGUI .php

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilObjPortfolioBaseGUI.

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

40 {
41 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
42 global $DIC;
43
44 $this->nav_history = $DIC["ilNavigationHistory"];
45 $this->help = $DIC["ilHelp"];
46 $this->tabs = $DIC->tabs();
47 $this->toolbar = $DIC->toolbar();
48 $this->user = $DIC->user();
49 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\help(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

Definition at line 536 of file class.ilObjPortfolioTemplateGUI.php.

536 : void
537 {
538 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
539 $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "createFromTemplateDirect");
540 }

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

+ Here is the call graph for this function:

◆ createFromTemplateOld()

ilObjPortfolioTemplateGUI::createFromTemplateOld ( )

Definition at line 530 of file class.ilObjPortfolioTemplateGUI.php.

530 : void
531 {
532 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
533 $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
534 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

56 : void
57 {
58 $ilNavigationHistory = $this->nav_history;
59
60 // add entry to navigation history
61 if (!$this->getCreationMode() &&
62 $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
63 $link = $this->ctrl->getLinkTarget($this, "view");
64 $ilNavigationHistory->addItem($this->node_id, $link, "prtt");
65 }
66
67 $next_class = $this->ctrl->getNextClass($this);
68 $cmd = $this->ctrl->getCmd("view");
69 switch ($next_class) {
70 case 'ilportfoliotemplatepagegui':
71 $this->determinePageCall(); // has to be done before locator!
72 $this->prepareOutput();
73 $this->handlePageCall($cmd);
74 break;
75
76 case "ilnotegui":
77 $this->preview();
78 break;
79
80 case "ilinfoscreengui":
81 $this->prepareOutput();
82 $this->addHeaderAction();
83 $this->infoScreenForward();
84 break;
85
86 case "ilcommonactiondispatchergui":
88 $this->prepareOutput();
89 $this->ctrl->forwardCommand($gui);
90 break;
91
92 case "ilpermissiongui":
93 $this->prepareOutput();
94 $this->tabs_gui->activateTab("id_permissions");
95 $perm_gui = new ilPermissionGUI($this);
96 $this->ctrl->forwardCommand($perm_gui);
97 break;
98
99 case "ilobjectcopygui":
100 $this->prepareOutput();
101 $cp = new ilObjectCopyGUI($this);
102 $cp->setType("prtt");
103 $this->ctrl->forwardCommand($cp);
104 break;
105
106 case 'ilexportgui':
107 $this->prepareOutput();
108 $this->tabs_gui->activateTab("export");
109 $exp_gui = new ilExportGUI($this);
110 $exp_gui->addFormat("xml");
111 $this->ctrl->forwardCommand($exp_gui);
112 break;
113
114 case "ilobjectcontentstylesettingsgui":
115 $this->checkPermission("write");
116 $this->prepareOutput();
117 $this->addHeaderAction();
118 $this->tabs_gui->activateTab("settings");
119 $this->setSettingsSubTabs("style");
120 $settings_gui = $this->content_style_gui
121 ->objectSettingsGUIForRefId(
122 null,
123 $this->object->getRefId()
124 );
125 $this->ctrl->forwardCommand($settings_gui);
126 break;
127
128 case "ilobjectmetadatagui":
129 $this->checkPermission("write");
130 $this->prepareOutput();
131 $this->addHeaderAction();
132 $this->tabs_gui->activateTab("advmd");
133 $md_gui = new ilObjectMetaDataGUI($this->object, "pfpg");
134 $this->ctrl->forwardCommand($md_gui);
135 break;
136
137 default:
138 $this->addHeaderAction();
140 }
141 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
preview(bool $a_return=false, $a_content=false, bool $a_show_notes=true)
executeCommand()
execute command
prepareOutput(bool $show_sub_objects=true)
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References $nav_history, ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjPortfolioBaseGUI\determinePageCall(), ilObject2GUI\executeCommand(), ilObject2GUI\getAccessHandler(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjPortfolioBaseGUI\handlePageCall(), infoScreenForward(), ILIAS\Repository\object(), ilObject2GUI\prepareOutput(), preview(), and ilObjPortfolioBaseGUI\setSettingsSubTabs().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioTemplateGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 348 of file class.ilObjPortfolioTemplateGUI.php.

348 : void
349 {
350 $a_values["online"] = $this->object->isOnline();
351 $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
352 ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
353 : null;
354 $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
355 ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
356 : null;
357 $a_values["access_visiblity"] = $this->object->getActivationVisibility();
358
359 $a_values['cont_custom_md'] = ilContainer::_lookupContainerSetting(
360 $this->object->getId(),
362 false
363 );
364
365 parent::getEditFormCustomValues($a_values);
366 }
const IL_CAL_UNIX
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
@classDescription Date and time handling

References ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, IL_CAL_UNIX, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

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

434 : string
435 {
436 return "ilportfoliotemplatepagegui";
437 }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance ( int  $a_page_id)
protected

Get portfolio template page gui instance.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 421 of file class.ilObjPortfolioTemplateGUI.php.

424 $page_gui = new ilPortfolioTemplatePageGUI(
425 $this->object->getId(),
426 $a_page_id,
427 0,
428 $this->object->hasPublicComments()
429 );
430 $page_gui->setAdditional($this->getAdditional());
431 return $page_gui;
432 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getPageInstance()

ilObjPortfolioTemplateGUI::getPageInstance ( ?int  $a_page_id = null,
?int  $a_portfolio_id = null 
)
protected

Get portfolio template page instance.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 406 of file class.ilObjPortfolioTemplateGUI.php.

410 if (!$a_portfolio_id && $this->object) {
411 $a_portfolio_id = $this->object->getId();
412 }
413 $page = new ilPortfolioTemplatePage((int) $a_page_id);
414 $page->setPortfolioId($a_portfolio_id);
415 return $page;
416 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getType()

ilObjPortfolioTemplateGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

51 : string
52 {
53 return "prtt";
54 }

◆ infoScreen()

ilObjPortfolioTemplateGUI::infoScreen ( )

this one is called from the info button in the repository

Definition at line 204 of file class.ilObjPortfolioTemplateGUI.php.

204 : void
205 {
206 $this->ctrl->setCmd("showSummary");
207 $this->ctrl->setCmdClass("ilinfoscreengui");
208 $this->infoScreenForward();
209 }

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

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

Definition at line 211 of file class.ilObjPortfolioTemplateGUI.php.

211 : void
212 {
213 $ilTabs = $this->tabs;
214 $ilToolbar = $this->toolbar;
215
216 $ilTabs->activateTab("id_info");
217
218 $this->checkPermission("visible");
219
220 if ($this->checkPermissionBool("read")) {
221 $this->lng->loadLanguageModule("cntr");
222
223 $button = ilLinkButton::getInstance();
224 $button->setPrimary(true);
225 $button->setCaption("prtf_create_portfolio_from_template");
226 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
227 $ilToolbar->addButtonInstance($button);
228 }
229
230 $info = new ilInfoScreenGUI($this);
231
232 $info->enablePrivateNotes();
233
234 if ($this->checkPermissionBool("read")) {
235 $info->enableNews();
236 }
237
238 // no news editing for files, just notifications
239 $info->enableNewsEditing(false);
240 if ($this->checkPermissionBool("write")) {
241 $news_set = new ilSetting("news");
242 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
243
244 if ($enable_internal_rss) {
245 $info->setBlockProperty("news", "settings", true);
246 $info->setBlockProperty("news", "public_notifications_option", true);
247 }
248 }
249
250 // standard meta data
251 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
252
253 $this->ctrl->forwardCommand($info);
254 }
Class ilInfoScreenGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
ilToolbarGUI $toolbar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $tabs, ilObject2GUI\$toolbar, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilLinkButton\getInstance(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by executeCommand(), and infoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initBlogForm()

ilObjPortfolioTemplateGUI::initBlogForm ( )
protected

Init blog template page form.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 465 of file class.ilObjPortfolioTemplateGUI.php.

466 {
467 $form = new ilPropertyFormGUI();
468 $form->setFormAction($this->ctrl->getFormAction($this));
469
470 $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
471 $obj->setRequired(true);
472 $form->addItem($obj);
473
474 // save and cancel commands
475 $form->setTitle($this->lng->txt("prtf_add_blog") . ": " .
476 $this->object->getTitle());
477 $form->addCommandButton("saveBlog", $this->lng->txt("save"));
478 $form->addCommandButton("view", $this->lng->txt("cancel"));
479
480 return $form;
481 }
This class represents a property form user interface.
This class represents a text property in a property form.

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

+ Here is the call graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioTemplateGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
protected

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 439 of file class.ilObjPortfolioTemplateGUI.php.

439 : void
440 {
441 // always existing prtft
442 $hi = new ilHiddenInputGUI("target");
443 $hi->setValue("old");
444 $a_form->addItem($hi);
445
446 $options = array();
448 foreach ($all as $id => $title) {
449 $options[$id] = $title;
450 }
451 $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
452 $prtf->setRequired(true);
453 $prtf->setOptions($options);
454 $a_form->addItem($prtf);
455 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAvailablePortfolioTemplates(string $a_permission="read")
This class represents a selection list property in a property form.

References $id, ilPropertyFormGUI\addItem(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initDidacticTemplate()

ilObjPortfolioTemplateGUI::initDidacticTemplate ( ilPropertyFormGUI  $form)
protected

Reimplemented from ilObjectGUI.

Definition at line 261 of file class.ilObjPortfolioTemplateGUI.php.

262 {
264
266 if (count($all)) {
267 $opts = array("" => $this->lng->txt("please_select"));
268 foreach ($all as $item) {
269 $opts[$item["id"]] = $item["title"];
270 }
271 $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
272 $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
273 $prtf->setOptions($opts);
274 $form->addItem($prtf);
275 }
276
277 return $form;
278 }
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
$ilUser
Definition: imgupload.php:34

References $ilUser, ilObject2GUI\$user, ilPropertyFormGUI\addItem(), ilObjPortfolio\getPortfoliosOfUser(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjPortfolioTemplateGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 295 of file class.ilObjPortfolioTemplateGUI.php.

295 : void
296 {
297 $obj_service = $this->object_service;
298 // activation/availability
299
300 $this->lng->loadLanguageModule('rep');
301
302 $section = new ilFormSectionHeaderGUI();
303 $section->setTitle($this->lng->txt('rep_activation_availability'));
304 $a_form->addItem($section);
305
306 // additional info only with multiple references
307 $act_obj_info = $act_ref_info = "";
308 if (count(ilObject::_getAllReferences($this->object->getId())) > 1) {
309 $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
310 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
311 }
312
313 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
314 $online->setInfo($this->lng->txt('prtt_activation_online_info') . $act_obj_info);
315 $a_form->addItem($online);
316
317 $dur = new ilDateDurationInputGUI($this->lng->txt("rep_visibility_until"), "access_period");
318 $dur->setShowTime(true);
319 $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
320 $a_form->addItem($dur);
321
322 $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
323 $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
324 $dur->addSubItem($visible);
325
326 $section = new ilFormSectionHeaderGUI();
327 $section->setTitle($this->lng->txt('obj_presentation'));
328 $a_form->addItem($section);
329
330 // tile image
331 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
332
333
334 parent::initEditCustomForm($a_form);
335
337 $this->object->getId(),
338 $a_form,
339 array(
341 )
342 );
343
344 $tit = $a_form->getItemByPostVar("title");
345 $tit->setInfo($this->lng->txt('prtt_title_info'));
346 }
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjectService $object_service
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static _getAllReferences(int $id)
get all reference ids for object ID
getItemByPostVar(string $a_post_var)

References ilObject2GUI\$object_service, ilObject\_getAllReferences(), ilPropertyFormGUI\addItem(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getItemByPostVar(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ preview()

ilObjPortfolioTemplateGUI::preview ( bool  $a_return = false,
  $a_content = false,
bool  $a_show_notes = true 
)

Definition at line 511 of file class.ilObjPortfolioTemplateGUI.php.

515 : string {
516 if (!$this->checkPermissionBool("write") &&
517 $this->checkPermissionBool("read")) {
518 $this->lng->loadLanguageModule("cntr");
519
520 $button = ilLinkButton::getInstance();
521 $button->setPrimary(true);
522 $button->setCaption("prtf_create_portfolio_from_template");
523 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
524 $this->tpl->setHeaderActionMenu($button->render());
525 }
526
527 return parent::preview($a_return, $a_content, $a_show_notes);
528 }

References ILIAS\Repository\ctrl(), ilLinkButton\getInstance(), and ILIAS\Repository\lng().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveBlog()

ilObjPortfolioTemplateGUI::saveBlog ( )
protected

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 483 of file class.ilObjPortfolioTemplateGUI.php.

483 : void
484 {
485 $form = $this->initBlogForm();
486 if ($form->checkInput() && $this->checkPermissionBool("write")) {
487 $page = $this->getPageInstance();
489 $page->setTitle($form->getInput("blog"));
490 $page->create(false);
491
492 $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_blog_page_created"), true);
493 $this->ctrl->redirect($this, "view");
494 }
495
496 $this->tabs_gui->clearTargets();
497 $this->tabs_gui->setBackTarget(
498 $this->lng->txt("back"),
499 $this->ctrl->getLinkTarget($this, "view")
500 );
501
502 $form->setValuesByPost();
503 $this->tpl->setContent($form->getHTML());
504 }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
Get portfolio template page instance.
initBlogForm()
Init blog template page form.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE.

+ Here is the call graph for this function:

◆ setTabs()

ilObjPortfolioTemplateGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

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

143 : void
144 {
145 $ilHelp = $this->help;
146
147 $ilHelp->setScreenIdComponent("prtt");
148
149 if ($this->checkPermissionBool("write")) {
150 $this->tabs_gui->addTab(
151 "pages",
152 $this->lng->txt("content"),
153 $this->ctrl->getLinkTarget($this, "view")
154 );
155 }
156
157 if ($this->checkPermissionBool("read")) {
158 $this->tabs_gui->addTab(
159 "id_info",
160 $this->lng->txt("info_short"),
161 $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary")
162 );
163 }
164
165 if ($this->checkPermissionBool("write")) {
166 $this->tabs_gui->addTab(
167 "settings",
168 $this->lng->txt("settings"),
169 $this->ctrl->getLinkTarget($this, "edit")
170 );
171
172 $mdgui = new ilObjectMetaDataGUI($this->object, "pfpg");
173 $mdtab = $mdgui->getTab();
174 if ($mdtab) {
175 $this->tabs_gui->addTab(
176 "advmd",
177 $this->lng->txt("meta_data"),
178 $mdtab
179 );
180 }
181
182 $this->tabs_gui->addTab(
183 "export",
184 $this->lng->txt("export"),
185 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
186 );
187 }
188
189 if ($this->checkPermissionBool("read")) {
190 $this->tabs_gui->addNonTabbedLink(
191 "preview",
192 $this->lng->txt("preview"),
193 $this->ctrl->getLinkTarget($this, "preview")
194 );
195 }
196
197 // will add permissions if needed
199 }
setScreenIdComponent(string $a_comp)
setTabs()
create tabs (repository/workspace switch)

References $help, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\lng(), ilHelpGUI\setScreenIdComponent(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjPortfolioTemplateGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Insert custom update form values into object.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 368 of file class.ilObjPortfolioTemplateGUI.php.

368 : void
369 {
370 $obj_service = $this->object_service;
371
372 $this->object->setOnline($form->getInput("online"));
373
374 // activation
375 $period = $form->getItemByPostVar("access_period");
376 if ($period->getStart() && $period->getEnd()) {
377 $this->object->setActivationLimited(true);
378 $this->object->setActivationVisibility($form->getInput("access_visiblity"));
379 $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
380 $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
381 } else {
382 $this->object->setActivationLimited(false);
383 }
384
385 parent::updateCustom($form);
386
387 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
388
390 $this->object->getId(),
391 $form,
392 array(
394 )
395 );
396 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ilObject2GUI\$object_service, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $help

ilHelpGUI ilObjPortfolioTemplateGUI::$help
protected

Definition at line 33 of file class.ilObjPortfolioTemplateGUI.php.

Referenced by setTabs().

◆ $nav_history

ilNavigationHistory ilObjPortfolioTemplateGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $tabs

ilTabsGUI ilObjPortfolioTemplateGUI::$tabs
protected

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

Referenced by infoScreenForward().


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