ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjPortfolioBaseGUI Class Reference

Portfolio view gui base class. More...

+ Inheritance diagram for ilObjPortfolioBaseGUI:
+ Collaboration diagram for ilObjPortfolioBaseGUI:

Public Member Functions

 __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 (?int $page_id=null)
 
 deletePortfolioPages ()
 
 editTitle (int $page_id)
 
 saveTitle ()
 
 export (bool $a_with_comments=false)
 
 exportWithComments ()
 
 copyPageForm (int|ilPropertyFormGUI|null $page_id_or_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] does belong to the parent 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)
 
 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)
 

Static Public Member Functions

static renderFullscreenHeader (ilObjPortfolioBase $a_portfolio, ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
 
- 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

 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)
 
 getPortfolioPageTable ()
 
 addPage ()
 Show portfolio page creation form. More...
 
 getEditTitleForm (int $page_id)
 
 getCurrentPage ()
 
 getCommentGUI ()
 
 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...
 
 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...
 
 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 ()
 @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...
 
 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)
 

Protected Attributes

ILIAS Notes Service $notes
 
ILIAS Portfolio InternalGUIService $gui
 
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
 
ILIAS DI UIServices $ui
 
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
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
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
 
GlobalHttpState $http
 
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
 
CustomIconFactory $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 = ""
 

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]
 

Detailed Description

Portfolio view gui base class.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilObject2GUI.

Reimplemented in ilObjPortfolioTemplateGUI.

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

51 {
52 global $DIC;
53
54 $this->user = $DIC->user();
55 $this->locator = $DIC["ilLocator"];
56 $this->toolbar = $DIC->toolbar();
57 $this->settings = $DIC->settings();
58 $this->tree = $DIC->repositoryTree();
59 $this->help = $DIC["ilHelp"];
60 $this->tpl = $DIC["tpl"];
61 $ilUser = $DIC->user();
62 $this->ui = $DIC->ui();
63
64 $this->port_request = $DIC->portfolio()
65 ->internal()
66 ->gui()
67 ->standardRequest();
68
69 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
70
71 $this->user_id = $ilUser->getId();
72
73 $this->lng->loadLanguageModule("prtf");
74 $this->lng->loadLanguageModule("user");
75 $this->lng->loadLanguageModule("obj");
76 $this->lng->loadLanguageModule("prtt");
77
78 $this->requested_ppage = $this->port_request->getPortfolioPageId();
79 $this->requested_user_page = $this->port_request->getUserPage();
80
81 $cs = $DIC->contentStyle();
82 $this->content_style_gui = $cs->gui();
83 if ($this->object) {
84 $this->content_style_domain = $cs->domain()->styleForObjId($this->object->getId());
85 }
86 $this->gui = $DIC->portfolio()->internal()->gui();
87 $this->notes = $DIC->notes();
88 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 90 of file class.ilObjPortfolioBaseGUI.php.

90 : void
91 {
92 $ilLocator = $this->locator;
93
94 if ($this->object) {
95 $ilLocator->addItem(
96 strip_tags($this->object->getTitle()),
97 $this->ctrl->getLinkTarget($this, "view")
98 );
99 }
100
101 if ($this->page_id > 0) {
102 $page = $this->getPageInstance($this->page_id);
103 $title = $page->getTitle();
104 $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
105 $ilLocator->addItem(
106 $title,
107 $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
108 );
109 }
110 }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
ilLocatorGUI $locator

References ilObject2GUI\$locator, $page, ILIAS\Repository\ctrl(), getPageGUIClassName(), getPageInstance(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

389 : void
390 {
391 $ilHelp = $this->help;
392
393 $this->tabs_gui->clearTargets();
394 $this->tabs_gui->setBackTarget(
395 $this->lng->txt("back"),
396 $this->ctrl->getLinkTarget($this, "view")
397 );
398
399 $ilHelp->setScreenIdComponent("prtf");
400 $ilHelp->setScreenId("add_page");
401
402
403 $form = $this->initPageForm("create");
404 $this->tpl->setContent($form->getHTML());
405 }
setScreenIdComponent(string $a_comp)
initPageForm(string $a_mode="create")
Init portfolio page form.

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( ?int  $page_id = null)

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

511 : void
512 {
513 $prtf_pages = $page_id !== null
514 ? [$page_id]
515 : $this->port_request->getPortfolioPageIds();
516
517 if ($page_id !== null) {
519 if ($page->getPortfolioId() !== $this->object->getId()) {
520 $prtf_pages = [];
521 }
522 }
523
524 if (count($prtf_pages) === 0) {
525 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
526 $this->ctrl->redirect($this, "view");
527 } elseif ($page_id !== null) {
528 $this->getPortfolioPageTable()->renderDeletionConfirmation(
529 $this->lng->txt("prtf_sure_delete_portfolio_pages"),
530 $this->lng->txt("prtf_sure_delete_portfolio_pages"),
531 "deletePortfolioPages",
532 [$page_id => $this->getPageInstance($page_id)->getTitle()]
533 );
534 } else {
535 $this->tabs_gui->activateTab("pages");
536
537 $cgui = new ilConfirmationGUI();
538 $cgui->setFormAction($this->ctrl->getFormAction($this));
539 $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
540 $cgui->setCancel($this->lng->txt("cancel"), "view");
541 $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
542
543 foreach ($prtf_pages as $id) {
544 $page = $this->getPageInstance($id);
545 if ($page->getPortfolioId() !== $this->object->getId()) {
546 continue;
547 }
548
549 $title = $page->getTitle();
550 $cgui->addItem("prtf_pages[]", $id, $title);
551 }
552
553 $this->tpl->setContent($cgui->getHTML());
554 }
555 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $id, $page, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

Definition at line 924 of file class.ilObjPortfolioBaseGUI.php.

924 : void
925 {
926 $form = $this->initCopyPageForm();
927 if ($form->checkInput()) {
928 // existing
929 if ($form->getInput("target") === "old") {
930 $portfolio_id = $form->getInput("prtf");
931 }
932 // new
933 else {
934 $portfolio = new ilObjPortfolio();
935 $portfolio->setTitle($form->getInput("title"));
936 $portfolio->create();
937 $portfolio_id = $portfolio->getId();
938 }
939
940 // copy page(s)
941 $page_ids = $this->port_request->getPortfolioPageIds();
942 foreach ($page_ids as $page_id) {
943 $source = $this->getPageInstance($page_id);
944 $target = $this->getPageInstance(null, $portfolio_id);
945 $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
946 $target->setType($source->getType());
947 $target->setTitle($source->getTitle());
948 $target->create();
949 }
950
951 $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_pages_copied"), true);
952 $this->ctrl->redirect($this, "view");
953 }
954
955 $form->setValuesByPost();
956 $this->copyPageForm($form);
957 }
copyPageForm(int|ilPropertyFormGUI|null $page_id_or_form=null)
Select target portfolio for page(s) copy.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Scripts\PHPStan\$target, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm ( int|ilPropertyFormGUI|null  $page_id_or_form = null)

Select target portfolio for page(s) copy.

Definition at line 894 of file class.ilObjPortfolioBaseGUI.php.

896 : void {
897 $a_form = $page_id_or_form instanceof ilPropertyFormGUI
898 ? $page_id_or_form
899 : null;
900 $prtf_pages = is_int($page_id_or_form)
901 ? [$page_id_or_form]
902 : $this->port_request->getPortfolioPageIds();
903
904 if (count($prtf_pages) === 0) {
905 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
906 $this->ctrl->redirect($this, "view");
907 } else {
908 $this->tabs_gui->activateTab("pages");
909
910 if (!$a_form) {
911 $a_form = $this->initCopyPageForm();
912 }
913
914 foreach ($prtf_pages as $page_id) {
915 $item = new ilHiddenInputGUI("prtf_pages[]");
916 $item->setValue($page_id);
917 $a_form->addItem($item);
918 }
919
920 $this->tpl->setContent($a_form->getHTML());
921 }
922 }
This class represents a hidden form property in a property form.
This class represents a property form user interface.

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

+ Here is the call graph for this function:

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Definition at line 557 of file class.ilObjPortfolioBaseGUI.php.

557 : void
558 {
559 if (!$this->checkPermissionBool("write")) {
560 return;
561 }
562
563 $page_ids = $this->getPortfolioPageTable()->getItemIds();
564 if (count($page_ids) === 0) {
565 $page_ids = $this->port_request->getPortfolioPageIds();
566 }
567 foreach ($page_ids as $id) {
568 $page = $this->getPageInstance($id);
569 $page->delete();
570 }
571 $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_portfolio_page_deleted"), true);
572 $this->ctrl->redirect($this, "view");
573 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)

References $id, $page, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

Definition at line 112 of file class.ilObjPortfolioBaseGUI.php.

112 : bool
113 {
114 // edit
115 if ($this->requested_ppage > 0) {
116 if (!$this->checkPermissionBool("write")) {
117 $this->ctrl->redirect($this, "view");
118 }
119
120 $this->page_id = $this->requested_ppage;
121 $this->page_mode = "edit";
122 $this->ctrl->setParameter($this, "ppage", $this->page_id);
123 return true;
124 }
125
126 // preview
127 $this->page_id = $this->requested_user_page;
128 $this->page_mode = "preview";
129 $this->ctrl->setParameter($this, "user_page", $this->page_id);
130 return false;
131 }

References $requested_ppage, $requested_user_page, ilObject2GUI\checkPermissionBool(), and ILIAS\Repository\ctrl().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

◆ editTitle()

ilObjPortfolioBaseGUI::editTitle ( int  $page_id)

Definition at line 588 of file class.ilObjPortfolioBaseGUI.php.

588 : void
589 {
590 $this->gui->clearAsnyOnloadCode();
591 $this->gui->modal($this->lng->txt("edit_page"))
592 ->form($this->getEditTitleForm($page_id))
593 ->send();
594 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( bool  $a_with_comments = false)

Definition at line 877 of file class.ilObjPortfolioBaseGUI.php.

879 : void {
880 $port_export = new \ILIAS\Portfolio\Export\PortfolioHtmlExport($this);
881 $port_export->includeComments($a_with_comments);
882 $port_export->exportHtml();
883 $port_export->deliver($this->object->getTitle() . ".zip", true);
884 }

◆ exportWithComments()

ilObjPortfolioBaseGUI::exportWithComments ( )

Definition at line 886 of file class.ilObjPortfolioBaseGUI.php.

886 : void
887 {
888 $this->export(true);
889 }
export(bool $a_with_comments=false)

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

Definition at line 180 of file class.ilObjPortfolioBaseGUI.php.

180 : array
181 {
182 return $this->additional;
183 }

References $additional.

◆ getCommentGUI()

ilObjPortfolioBaseGUI::getCommentGUI ( )
protected

Definition at line 771 of file class.ilObjPortfolioBaseGUI.php.

772 {
773 $gui = $this->notes->gui()->getCommentsGUI(
774 $this->object->getId(),
775 $this->getCurrentPage(),
776 "pfpg"
777 );
778 $gui->setRepositoryMode(false);
779 $gui->enablePublicNotesDeletion(($this->user_id === $this->object->getOwner()) &&
780 $this->settings->get("comments_del_tutor", '1'));
781 return $gui;
782 }
ILIAS Portfolio InternalGUIService $gui

References ILIAS\Repository\object(), and ilNoteGUI\setRepositoryMode().

+ Here is the call graph for this function:

◆ getCurrentPage()

ilObjPortfolioBaseGUI::getCurrentPage ( )
protected

Definition at line 743 of file class.ilObjPortfolioBaseGUI.php.

743 : ?int
744 {
745 $pages = ilPortfolioPage::getAllPortfolioPages($this->object->getId());
746 $current_page = (int) $this->requested_user_page;
747
748 // validate current page
749 if ($pages && $current_page) {
750 $found = false;
751 foreach ($pages as $page) {
752 if ((int) $page["id"] === $current_page) {
753 $found = true;
754 break;
755 }
756 }
757 if (!$found) {
758 $current_page = null;
759 }
760 }
761
762 // display first page of portfolio if none given
763 if (!$current_page && $pages) {
764 $current_page = $pages;
765 $current_page = array_shift($current_page);
766 $current_page = (int) $current_page["id"];
767 }
768 return $current_page;
769 }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.

References $page, ilPortfolioPage\getAllPortfolioPages(), ILIAS\Repository\int(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Reimplemented from ilObjectGUI.

Definition at line 249 of file class.ilObjPortfolioBaseGUI.php.

249 : void
250 {
251 $a_values["comments"] = $this->object->hasPublicComments();
252 $a_values["ppic"] = $this->object->hasProfilePicture();
253 /*
254 $a_values["bg_color"] = $this->object->getBackgroundColor();
255 $a_values["font_color"] = $this->object->getFontColor();
256 */
257 }

◆ getEditTitleForm()

ilObjPortfolioBaseGUI::getEditTitleForm ( int  $page_id)
protected

Definition at line 575 of file class.ilObjPortfolioBaseGUI.php.

576 {
577 $this->ctrl->setParameterByClass(static::class, "edit_id", $page_id);
578 return $this->gui->form([static::class], "saveTitle")
579 ->text(
580 "title",
581 $this->lng->txt("title"),
582 "",
583 $this->getPageInstance($page_id)->getTitle(),
584 200
585 );
586 }

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

+ Here is the call graph for this function:

◆ getPageGUIClassName()

ilObjPortfolioBaseGUI::getPageGUIClassName ( )
abstract

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by addLocatorItems().

+ Here is the caller graph for this function:

◆ getPageGUIInstance()

ilObjPortfolioBaseGUI::getPageGUIInstance ( int  $a_page_id)
abstractprotected

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by handlePageCall().

+ Here is the caller graph for this function:

◆ getPageInstance()

ilObjPortfolioBaseGUI::getPageInstance ( ?int  $a_page_id = null,
?int  $a_portfolio_id = null 
)
abstractprotected

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by addLocatorItems().

+ Here is the caller graph for this function:

◆ getPortfolioPageTable()

ilObjPortfolioBaseGUI::getPortfolioPageTable ( )
protected

Definition at line 280 of file class.ilObjPortfolioBaseGUI.php.

281 {
282 return $this->gui->portfolioPageTableBuilder(
283 $this->getObject()->getId(),
284 $this,
285 "view"
286 )->getTable();
287 }

References ILIAS\Survey\Mode\getId(), and ILIAS\Repository\Table\TableAdapterGUI\getTable().

+ Here is the call graph for this function:

◆ handlePageCall()

ilObjPortfolioBaseGUI::handlePageCall ( string  $a_cmd)
protected

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

133 : void
134 {
135 if (!$this->page_id) {
136 $this->ctrl->redirect($this, "view");
137 }
138
139 $page_gui = $this->getPageGUIInstance($this->page_id);
140
141 $this->tabs_gui->clearTargets();
142 $this->tabs_gui->setBackTarget(
143 $this->lng->txt("back"),
144 $this->ctrl->getLinkTarget($this, "view")
145 );
146
147 // needed for editor
148 $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
149
150 $ret = $this->ctrl->forwardCommand($page_gui);
151 if ($ret != "" && $ret !== true) {
152 // preview (fullscreen)
153 if ($this->page_mode === "preview") {
154 // embedded call which did not generate any output (e.g. calendar month navigation)
156 // suppress (portfolio) notes for blog postings
157 $this->preview(false, $ret, ($a_cmd !== "previewEmbedded"));
158 } else {
159 $this->preview(false);
160 }
161 }
162 // edit
163 else {
164 $this->setContentStyleSheet();
165 if (is_string($ret)) {
166 $this->tpl->setContent($ret);
167 }
168 }
169 }
170 }
getPageGUIInstance(int $a_page_id)
setContentStyleSheet(?ilGlobalTemplateInterface $a_tpl=null)

References ILIAS\Repository\ctrl(), ilPortfolioPageGUI\EMBEDDED_NO_OUTPUT, getPageGUIInstance(), ILIAS\Repository\lng(), ILIAS\UI\examples\Symbol\Glyph\Preview\preview(), and setContentStyleSheet().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

Definition at line 961 of file class.ilObjPortfolioBaseGUI.php.

962 {
963 $form = new ilPropertyFormGUI();
964 $form->setFormAction($this->ctrl->getFormAction($this));
965 $form->setTitle($this->lng->txt("prtf_copy_page"));
966
967 $this->initCopyPageFormOptions($form);
968
969 $form->addCommandButton("copyPage", $this->lng->txt("save"));
970 $form->addCommandButton("view", $this->lng->txt("cancel"));
971
972 return $form;
973 }
initCopyPageFormOptions(ilPropertyFormGUI $a_form)

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

+ Here is the call graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
abstractprotected

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjectGUI.

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

221 : void
222 {
223 $this->setSettingsSubTabs("properties");
224
225
226 // profile picture
227 $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
228 $a_form->addItem($ppic);
229
230 $prfa_set = new ilSetting("prfa");
231
232 $section = new ilFormSectionHeaderGUI();
233 $section->setTitle($this->lng->txt('obj_features'));
234 $a_form->addItem($section);
235
236 // comments
237 $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
238 $a_form->addItem($comments);
239
240 /* #15000
241 $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
242 $a_form->addItem($bg_color);
243
244 $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
245 $a_form->addItem($font_color);
246 */
247 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
ILIAS Setting Class.
$comments

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

+ Here is the call graph for this function:

◆ initPageForm()

ilObjPortfolioBaseGUI::initPageForm ( string  $a_mode = "create")

Init portfolio page form.

Definition at line 410 of file class.ilObjPortfolioBaseGUI.php.

411 {
412 $form = new ilPropertyFormGUI();
413 $form->setFormAction($this->ctrl->getFormAction($this));
414
415 // title
416 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
417 $ti->setMaxLength(200);
418 $ti->setRequired(true);
419 $form->addItem($ti);
420
421 // save and cancel commands
422 if ($a_mode === "create") {
424 if ($templates) {
425 $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
426 $use_template->setRequired(true);
427 $form->addItem($use_template);
428
429 $opt = new ilRadioOption($this->lng->txt("none"), 0);
430 $use_template->addOption($opt);
431
432 foreach ($templates as $templ) {
433 $templ->readObject();
434
435 $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
436 $use_template->addOption($opt);
437 }
438 }
439
440 $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
441 $this->object->getTitle());
442 $form->addCommandButton("savePage", $this->lng->txt("save"));
443 $form->addCommandButton("view", $this->lng->txt("cancel"));
444 }
445
446 return $form;
447 }
static activeLayouts(int $a_module=0)
Get active layouts.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text property in a property form.

References ilPageLayout\activeLayouts(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPageLayout\MODULE_PORTFOLIO.

+ Here is the call graph for this function:

◆ renderFullscreenHeader()

static ilObjPortfolioBaseGUI::renderFullscreenHeader ( ilObjPortfolioBase  $a_portfolio,
ilGlobalTemplateInterface  $a_tpl,
int  $a_user_id,
bool  $a_export = false 
)
static

Definition at line 827 of file class.ilObjPortfolioBaseGUI.php.

832 : void {
833 global $DIC;
834
835 $ilUser = $DIC->user();
836
837 if (!$a_export) {
839 $a_portfolio->getType(),
840 ($a_portfolio->getType() === "prtt")
841 ? $a_portfolio->getRefId()
842 : $a_portfolio->getId(),
843 $a_portfolio->getId(),
844 $ilUser->getId()
845 );
846 }
847
848 $name = ilObjUser::_lookupName($a_user_id);
849 $name = $name["lastname"] . ", " . (($t = $name["title"]) ? $t . " " : "") . $name["firstname"];
850
851 $prfa_set = new ilSetting("prfa");
852
853 // profile picture
854 $ppic = null;
855 if ($a_portfolio->hasProfilePicture()) {
856 $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
857 if ($a_export) {
858 $ppic = basename($ppic);
859 }
860 }
861
862 $a_tpl->resetHeaderBlock(false);
863 // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
864 // @todo fix this
865 $a_tpl->setTitleIcon((string) $ppic);
866 $a_tpl->setTitle($a_portfolio->getTitle());
867 // $a_tpl->setTitleColor($a_portfolio->getFontColor());
868 $a_tpl->setDescription($name);
869
870 // to get rid of locator in portfolio template preview
871 $a_tpl->setVariable("LOCATOR", "");
872
873 // :TODO: obsolete?
874 // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
875 }
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, $a_ext_rc=null, $a_ext_time=null)
static _getPersonalPicturePath(int $usr_id, string $size='small', bool $force_pic=false)
static _lookupName(int $a_user_id)
setDescription(string $a_descr)
Sets description below title in standard template.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.

References ilChangeEvent\_recordReadEvent(), ilObject\getId(), ilObject\getRefId(), and ilObject\getType().

+ Here is the call graph for this function:

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

452 : void
453 {
454 $form = $this->initPageForm("create");
455 if ($form->checkInput() && $this->checkPermissionBool("write")) {
456 $page = $this->getPageInstance();
458 $page->setTitle($form->getInput("title"));
459
460 // use template as basis
461 $layout_id = $form->getInput("tmpl");
462 if ($layout_id) {
463 $layout_obj = new ilPageLayout($layout_id);
464 $page->setXMLContent($layout_obj->copyXmlContent(false));
465 }
466
467 $page->create();
468
469 $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_page_created"), true);
470 $this->ctrl->redirect($this, "view");
471 }
472
473 $this->tabs_gui->clearTargets();
474 $this->tabs_gui->setBackTarget(
475 $this->lng->txt("back"),
476 $this->ctrl->getLinkTarget($this, "view")
477 );
478
479 $form->setValuesByPost();
480 $this->tpl->setContent($form->getHTML());
481 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $page, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPortfolioPage\TYPE_PAGE.

+ Here is the call graph for this function:

◆ savePortfolioPagesOrdering()

ilObjPortfolioBaseGUI::savePortfolioPagesOrdering ( )

Save ordering of portfolio pages.

Definition at line 486 of file class.ilObjPortfolioBaseGUI.php.

486 : void
487 {
488 if (!$this->checkPermissionBool("write")) {
489 return;
490 }
491
492 $order = $this->getPortfolioPageTable()->getData();
493 if (is_array($order)) {
494 $order_nr = 10;
495 foreach ($order as $id) {
496 $page = $this->getPageInstance((int) $id);
497 if ($page->getPortfolioId() !== $this->object->getId()) {
498 continue;
499 }
500 $page->setOrderNr($order_nr);
501 $page->update();
502 $order_nr += 10;
503 }
504 ilPortfolioPage::fixOrdering($this->object->getId());
505 }
506
507 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
508 $this->ctrl->redirect($this, "view");
509 }
static fixOrdering(int $a_portfolio_id)

References $id, $page, ILIAS\Repository\ctrl(), ilPortfolioPage\fixOrdering(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ saveTitle()

ilObjPortfolioBaseGUI::saveTitle ( )

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

596 : void
597 {
598 if (!$this->checkPermissionBool("write")) {
599 return;
600 }
601
602 $page_id = $this->port_request->getEditPageId();
604 if ($page->getPortfolioId() !== $this->object->getId()) {
605 $this->ctrl->redirect($this, "view");
606 }
607
608 $form = $this->getEditTitleForm($page_id);
609 if ($form->isValid()) {
610 $new_title = $form->getData("title");
611 $title_changes = [];
612 if ($page->getTitle() !== $new_title) {
613 $title_changes[$page_id] = [
614 "old" => $page->getTitle(),
615 "new" => $new_title
616 ];
617 $page->setTitle($new_title);
618 $page->update();
619 $this->object->fixLinksOnTitleChange($title_changes);
620 }
621 }
622
623 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
624 $this->ctrl->setParameterByClass(self::class, "edit_id", "");
625 $this->ctrl->redirect($this, "view");
626 }

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

+ Here is the call graph for this function:

◆ setAdditional()

ilObjPortfolioBaseGUI::setAdditional ( array  $a_additional)

Set Additonal Information (used in public profile?)

Definition at line 175 of file class.ilObjPortfolioBaseGUI.php.

175 : void
176 {
177 $this->additional = $a_additional;
178 }

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet ( ?ilGlobalTemplateInterface  $a_tpl = null)

Definition at line 980 of file class.ilObjPortfolioBaseGUI.php.

982 : void {
984
985 if ($a_tpl) {
986 $ctpl = $a_tpl;
987 } else {
988 $ctpl = $tpl;
989 }
990
991 $this->content_style_gui->addCss(
992 $ctpl,
993 $this->object->getRefId(),
994 $this->object->getId()
995 );
996 }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.

Referenced by handlePageCall().

+ Here is the caller graph for this function:

◆ setPermaLink()

ilObjPortfolioBaseGUI::setPermaLink ( int  $a_obj_id,
string  $a_type 
)

Set custom perma link (used in public profile?)

Definition at line 188 of file class.ilObjPortfolioBaseGUI.php.

191 : void {
192 $this->perma_link = array("obj_id" => $a_obj_id, "type" => $a_type);
193 }

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs ( string  $a_active)
protected

Definition at line 200 of file class.ilObjPortfolioBaseGUI.php.

200 : void
201 {
202 // #17455
203 $this->lng->loadLanguageModule($this->getType());
204
205 // general properties
206 $this->tabs_gui->addSubTab(
207 "properties",
208 $this->lng->txt($this->getType() . "_properties"),
209 $this->ctrl->getLinkTarget($this, 'edit')
210 );
211
212 $this->tabs_gui->addSubTab(
213 "style",
214 $this->lng->txt("obj_sty"),
215 $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
216 );
217
218 $this->tabs_gui->activateSubTab($a_active);
219 }
getType()
Functions that must be overwritten.

References ILIAS\Repository\lng().

Referenced by ilObjPortfolioTemplateGUI\executeCommand().

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

◆ showEditButton()

ilObjPortfolioBaseGUI::showEditButton ( int  $page_id)
protected

Definition at line 784 of file class.ilObjPortfolioBaseGUI.php.

786 : void {
787 $page_class = ($this->getType() === "prtt")
788 ? "ilPortfolioTemplatePageGUI"
789 : "ilportfoliopagegui";
790 $button = null;
791 if ($this->checkPermissionBool("write") &&
793 if ($this->getType() === "prtt") {
794 $button = $this->ui->factory()->button()->standard(
795 $this->lng->txt("prtt_edit"),
796 $this->ctrl->getLinkTargetByClass(["ilobjportfoliotemplategui"], "view")
797 );
798 } else {
799 $button = $this->ui->factory()->button()->standard(
800 $this->lng->txt("prtf_edit_portfolio"),
801 $this->ctrl->getLinkTargetByClass([
802 ilDashboardGUI::class,
803 ilPortfolioRepositoryGUI::class,
804 ilObjPortfolioGUI::class
805 ], "view")
806 );
807 }
808 $this->toolbar->addComponent($button);
809 $button = null;
810 }
812 $this->ctrl->setParameterByClass($page_class, "ppage", $page_id);
813 $button = $this->ui->factory()->button()->standard(
814 $this->lng->txt("edit_page"),
815 $this->ctrl->getLinkTargetByClass($page_class, "edit")
816 );
817 if ($this->checkPermissionBool("write")) {
818 $this->toolbar->addComponent($button);
819 }
820 $button = null;
821 }
822 if ($button && $this->checkPermissionBool("write")) {
823 $this->tpl->setHeaderActionMenu($this->ui->renderer()->render($button));
824 }
825 }
static lookupType($a_page_id)

References ILIAS\Repository\lng(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Insert custom update form values into object.

Reimplemented from ilObjectGUI.

Definition at line 259 of file class.ilObjPortfolioBaseGUI.php.

259 : void
260 {
261 $this->object->setPublicComments($form->getInput("comments"));
262 $this->object->setProfilePicture($form->getInput("ppic"));
263 $prfa_set = new ilSetting("prfa");
264 }
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 ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

◆ view()

ilObjPortfolioBaseGUI::view ( )

Show list of portfolio pages.

Reimplemented from ilObject2GUI.

Definition at line 292 of file class.ilObjPortfolioBaseGUI.php.

292 : void
293 {
294 $ilToolbar = $this->toolbar;
297
298 if (!$this->checkPermissionBool("write")) {
299 $this->ctrl->redirect($this, "infoScreen");
300 }
301
302 $this->tabs_gui->activateTab("pages");
303
305
306 $this->gui->button(
307 $this->lng->txt("prtf_add_page"),
308 $this->ctrl->getLinkTarget($this, "addPage")
309 )->toToolbar(true);
310
311
312 // #16571
313 $modal_html = "";
314 if ($this->getType() === "prtf" && count($pages) > 0) {
315 $ilToolbar->addSeparator();
316
317 $ui = $this->ui;
318
319 if ($this->object->isCommentsExportPossible()) {
320 $this->lng->loadLanguageModule("note");
321 $comment_export_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
322 $comment_modal = $comment_export_helper->getCommentIncludeModalDialog(
323 $this->lng->txt("export_html"),
324 $this->lng->txt("note_html_export_include_comments"),
325 $this->ctrl->getLinkTarget($this, "export"),
326 $this->ctrl->getLinkTarget($this, "exportWithComments")
327 );
328 $button = $ui->factory()->button()->standard($this->lng->txt("export_html"), '')
329 ->withOnClick($comment_modal->getShowSignal());
330 $ilToolbar->addComponent($button);
331 $modal_html = $ui->renderer()->render($comment_modal);
332 } else {
333 $this->gui->button(
334 $this->lng->txt("export_html"),
335 $this->ctrl->getLinkTarget($this, "export")
336 )->toToolbar();
337 }
338
339 $print_view = $this->getPrintView();
340 $modal_elements = $print_view->getModalElements($this->ctrl->getLinkTarget(
341 $this,
342 "printSelection"
343 ));
344 $modal_html .= $ui->renderer()->render($modal_elements->modal);
345 $ilToolbar->addComponent($modal_elements->button);
346 }
347
348 $table = $this->getPortfolioPageTable();
349 if ($table->handleCommand()) {
350 return;
351 }
352
353 $this->tpl->setContent($table->render() . $modal_html);
354 }
ilToolbarGUI $toolbar
ilSetting $settings
global $ilSetting
Definition: privfeed.php:26

References $ilSetting, $lng, $settings, ILIAS\Repository\ctrl(), ilPortfolioPage\getAllPortfolioPages(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

Field Documentation

◆ $additional

array ilObjPortfolioBaseGUI::$additional = array()
protected

Definition at line 37 of file class.ilObjPortfolioBaseGUI.php.

Referenced by getAdditional().

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjPortfolioBaseGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjPortfolioBaseGUI::$content_style_gui
protected

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

◆ $gui

ILIAS Portfolio InternalGUIService ilObjPortfolioBaseGUI::$gui
protected

◆ $help

ilHelpGUI ilObjPortfolioBaseGUI::$help
protected

Definition at line 35 of file class.ilObjPortfolioBaseGUI.php.

◆ $notes

ILIAS Notes Service ilObjPortfolioBaseGUI::$notes
protected

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

◆ $page_id

int ilObjPortfolioBaseGUI::$page_id = 0
protected

Definition at line 39 of file class.ilObjPortfolioBaseGUI.php.

◆ $page_mode

string ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

array ilObjPortfolioBaseGUI::$perma_link = []
protected

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

◆ $port_request

StandardGUIRequest ilObjPortfolioBaseGUI::$port_request
protected

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

◆ $requested_ppage

int ilObjPortfolioBaseGUI::$requested_ppage
protected

Definition at line 41 of file class.ilObjPortfolioBaseGUI.php.

Referenced by determinePageCall().

◆ $requested_user_page

int ilObjPortfolioBaseGUI::$requested_user_page
protected

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

Referenced by determinePageCall().

◆ $ui

ILIAS DI UIServices ilObjPortfolioBaseGUI::$ui
protected

Definition at line 43 of file class.ilObjPortfolioBaseGUI.php.

◆ $user_id

int ilObjPortfolioBaseGUI::$user_id = 0
protected

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


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