ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 ()
 
 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)
 
 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 ()
 
 determinePageCall ()
 
 handlePageCall (string $a_cmd)
 
 setSettingsSubTabs (string $a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 
 getPageGUIInstance (int $a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 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="")
 
 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)
 

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
 
string $requested_back_url = ""
 
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 27 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 
)

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), 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().

49  {
50  global $DIC;
51 
52  $this->user = $DIC->user();
53  $this->locator = $DIC["ilLocator"];
54  $this->toolbar = $DIC->toolbar();
55  $this->settings = $DIC->settings();
56  $this->tree = $DIC->repositoryTree();
57  $this->help = $DIC["ilHelp"];
58  $this->tpl = $DIC["tpl"];
59  $ilUser = $DIC->user();
60  $this->ui = $DIC->ui();
61 
62  $this->port_request = $DIC->portfolio()
63  ->internal()
64  ->gui()
65  ->standardRequest();
66 
67  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
68 
69  $this->user_id = $ilUser->getId();
70 
71  $this->lng->loadLanguageModule("prtf");
72  $this->lng->loadLanguageModule("user");
73  $this->lng->loadLanguageModule("obj");
74 
75  $this->requested_ppage = $this->port_request->getPortfolioPageId();
76  $this->requested_user_page = $this->port_request->getUserPage();
77 
78  // temp sanitization, should be done smarter in the future
79  $back = str_replace("&", ":::", $this->port_request->getBackUrl());
80  $back = preg_replace(
81  "/[^a-zA-Z0-9_\.\?=:\s]/",
82  "",
83  $back
84  );
85  $this->requested_back_url = str_replace(":::", "&", $back);
86 
87  $this->ctrl->setParameterByClass("ilobjportfoliogui", "back_url", rawurlencode($this->requested_back_url));
88  $cs = $DIC->contentStyle();
89  $this->content_style_gui = $cs->gui();
90  if ($this->object) {
91  $this->content_style_domain = $cs->domain()->styleForObjId($this->object->getId());
92  }
93  $this->gui = $DIC->portfolio()->internal()->gui();
94  $this->notes = $DIC->notes();
95  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

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

Referenced by ilObjPortfolioGUI\addLocator().

97  : void
98  {
99  $ilLocator = $this->locator;
100 
101  if ($this->object) {
102  $ilLocator->addItem(
103  strip_tags($this->object->getTitle()),
104  $this->ctrl->getLinkTarget($this, "view")
105  );
106  }
107 
108  if ($this->page_id > 0) {
109  $page = $this->getPageInstance($this->page_id);
110  $title = $page->getTitle();
111  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
112  $ilLocator->addItem(
113  $title,
114  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
115  );
116  }
117  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

References $help, ILIAS\Repository\ctrl(), initPageForm(), ILIAS\Repository\lng(), and ilHelpGUI\setScreenIdComponent().

385  : void
386  {
387  $ilHelp = $this->help;
388 
389  $this->tabs_gui->clearTargets();
390  $this->tabs_gui->setBackTarget(
391  $this->lng->txt("back"),
392  $this->ctrl->getLinkTarget($this, "view")
393  );
394 
395  $ilHelp->setScreenIdComponent("prtf");
396  $ilHelp->setScreenId("add_page");
397 
398 
399  $form = $this->initPageForm("create");
400  $this->tpl->setContent($form->getHTML());
401  }
setScreenIdComponent(string $a_comp)
initPageForm(string $a_mode="create")
Init portfolio page form.
+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( )

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

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

514  : void
515  {
516  $prtf_pages = $this->port_request->getPortfolioPageIds();
517 
518  if (count($prtf_pages) === 0) {
519  $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
520  $this->ctrl->redirect($this, "view");
521  } else {
522  $this->tabs_gui->activateTab("pages");
523 
524  $cgui = new ilConfirmationGUI();
525  $cgui->setFormAction($this->ctrl->getFormAction($this));
526  $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
527  $cgui->setCancel($this->lng->txt("cancel"), "view");
528  $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
529 
530  foreach ($prtf_pages as $id) {
531  $page = $this->getPageInstance($id);
532  if ($page->getPortfolioId() !== $this->object->getId()) {
533  continue;
534  }
535 
536  $title = $page->getTitle();
537  $cgui->addItem("prtf_pages[]", $id, $title);
538  }
539 
540  $this->tpl->setContent($cgui->getHTML());
541  }
542  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

References copyPageForm(), ILIAS\Repository\ctrl(), getPageInstance(), initCopyPageForm(), initCopyPageFormOptions(), ILIAS\Repository\lng(), and null.

881  : void
882  {
883  $form = $this->initCopyPageForm();
884  if ($form->checkInput()) {
885  // existing
886  if ($form->getInput("target") === "old") {
887  $portfolio_id = $form->getInput("prtf");
888  }
889  // new
890  else {
891  $portfolio = new ilObjPortfolio();
892  $portfolio->setTitle($form->getInput("title"));
893  $portfolio->create();
894  $portfolio_id = $portfolio->getId();
895  }
896 
897  // copy page(s)
898  $page_ids = $this->port_request->getPortfolioPageIds();
899  foreach ($page_ids as $page_id) {
900  $source = $this->getPageInstance($page_id);
901  $target = $this->getPageInstance(null, $portfolio_id);
902  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
903  $target->setType($source->getType());
904  $target->setTitle($source->getTitle());
905  $target->create();
906  }
907 
908  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_pages_copied"), true);
909  $this->ctrl->redirect($this, "view");
910  }
911 
912  $form->setValuesByPost();
913  $this->copyPageForm($form);
914  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
copyPageForm(?ilPropertyFormGUI $a_form=null)
Select target portfolio for page(s) copy.
+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm ( ?ilPropertyFormGUI  $a_form = null)

Select target portfolio for page(s) copy.

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

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

Referenced by copyPage().

858  : void {
859  $prtf_pages = $this->port_request->getPortfolioPageIds();
860 
861  if (count($prtf_pages) === 0) {
862  $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
863  $this->ctrl->redirect($this, "view");
864  } else {
865  $this->tabs_gui->activateTab("pages");
866 
867  if (!$a_form) {
868  $a_form = $this->initCopyPageForm();
869  }
870 
871  foreach ($prtf_pages as $page_id) {
872  $item = new ilHiddenInputGUI("prtf_pages[]");
873  $item->setValue($page_id);
874  $a_form->addItem($item);
875  }
876 
877  $this->tpl->setContent($a_form->getHTML());
878  }
879  }
This class represents a hidden form property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

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

References ilObjectGUI\$id, $ilSetting, ilObjectGUI\$object, ilObject2GUI\$parent_id, $requested_back_url, ilObjectGUI\$settings, ilObjectGUI\$tree, ilObject2GUI\$user, ilLink\_getStaticLink(), ANONYMOUS_USER_ID, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilPortfolioPage\getAllPortfolioPages(), getCommentGUI(), getCurrentPage(), ilObject\getId(), getPageGUIInstance(), getPageInstance(), ilTree\getParentId(), ilObject2GUI\getType(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\UI\examples\Symbol\Glyph\Preview\preview(), setContentStyleSheet(), and showEditButton().

544  : void
545  {
546  if (!$this->checkPermissionBool("write")) {
547  return;
548  }
549 
550  $page_ids = $this->port_request->getPortfolioPageIds();
551  foreach ($page_ids as $id) {
552  $page = $this->getPageInstance($id);
553  $page->delete();
554  }
555  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_portfolio_page_deleted"), true);
556  $this->ctrl->redirect($this, "view");
557  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

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

Referenced by ilObjPortfolioTemplateGUI\executeCommand(), and ilObjPortfolioGUI\executeCommand().

119  : bool
120  {
121  // edit
122  if ($this->requested_ppage > 0) {
123  if (!$this->checkPermissionBool("write")) {
124  $this->ctrl->redirect($this, "view");
125  }
126 
127  $this->page_id = $this->requested_ppage;
128  $this->page_mode = "edit";
129  $this->ctrl->setParameter($this, "ppage", $this->page_id);
130  return true;
131  }
132 
133  // preview
134  $this->page_id = $this->requested_user_page;
135  $this->page_mode = "preview";
136  $this->ctrl->setParameter($this, "user_page", $this->page_id);
137  return false;
138  }
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:

◆ export()

ilObjPortfolioBaseGUI::export ( bool  $a_with_comments = false)

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

References ILIAS\Repository\object().

Referenced by exportWithComments().

841  : void {
842  $port_export = new \ILIAS\Portfolio\Export\PortfolioHtmlExport($this);
843  $port_export->includeComments($a_with_comments);
844  $port_export->exportHtml();
845  $port_export->deliver($this->object->getTitle() . ".zip", true);
846  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportWithComments()

ilObjPortfolioBaseGUI::exportWithComments ( )

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

References export().

848  : void
849  {
850  $this->export(true);
851  }
export(bool $a_with_comments=false)
+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

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

References $additional.

Referenced by ilObjPortfolioTemplateGUI\getPageGUIInstance(), and ilObjPortfolioGUI\getPageGUIInstance().

187  : array
188  {
189  return $this->additional;
190  }
+ Here is the caller graph for this function:

◆ getCommentGUI()

ilObjPortfolioBaseGUI::getCommentGUI ( )
protected

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

References $gui, getCurrentPage(), ILIAS\Repository\object(), ilNoteGUI\setRepositoryMode(), and ILIAS\Repository\settings().

Referenced by deletePortfolioPages().

737  : ilCommentGUI
738  {
739  $gui = $this->notes->gui()->getCommentsGUI(
740  $this->object->getId(),
741  $this->getCurrentPage(),
742  "pfpg"
743  );
744  $gui->setRepositoryMode(false);
745  $gui->enablePublicNotesDeletion(($this->user_id === $this->object->getOwner()) &&
746  $this->settings->get("comments_del_tutor", '1'));
747  return $gui;
748  }
ILIAS Portfolio InternalGUIService $gui
Comment GUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentPage()

ilObjPortfolioBaseGUI::getCurrentPage ( )
protected

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

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

Referenced by deletePortfolioPages(), and getCommentGUI().

709  : ?int
710  {
711  $pages = ilPortfolioPage::getAllPortfolioPages($this->object->getId());
712  $current_page = (int) $this->requested_user_page;
713 
714  // validate current page
715  if ($pages && $current_page) {
716  $found = false;
717  foreach ($pages as $page) {
718  if ((int) $page["id"] === $current_page) {
719  $found = true;
720  break;
721  }
722  }
723  if (!$found) {
724  $current_page = null;
725  }
726  }
727 
728  // display first page of portfolio if none given
729  if (!$current_page && $pages) {
730  $current_page = $pages;
731  $current_page = array_shift($current_page);
732  $current_page = (int) $current_page["id"];
733  }
734  return $current_page;
735  }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

256  : void
257  {
258  $a_values["comments"] = $this->object->hasPublicComments();
259  $a_values["ppic"] = $this->object->hasProfilePicture();
260  /*
261  $a_values["bg_color"] = $this->object->getBackgroundColor();
262  $a_values["font_color"] = $this->object->getFontColor();
263  */
264  }

◆ getPageGUIClassName()

ilObjPortfolioBaseGUI::getPageGUIClassName ( )
abstract

Referenced by addLocatorItems(), and updateCustom().

+ Here is the caller graph for this function:

◆ getPageGUIInstance()

ilObjPortfolioBaseGUI::getPageGUIInstance ( int  $a_page_id)
abstractprotected

Referenced by deletePortfolioPages(), handlePageCall(), and updateCustom().

+ Here is the caller graph for this function:

◆ getPageInstance()

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

◆ handlePageCall()

ilObjPortfolioBaseGUI::handlePageCall ( string  $a_cmd)
protected

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

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(), and ilObjPortfolioGUI\executeCommand().

140  : void
141  {
142  if (!$this->page_id) {
143  $this->ctrl->redirect($this, "view");
144  }
145 
146  $page_gui = $this->getPageGUIInstance($this->page_id);
147 
148  $this->tabs_gui->clearTargets();
149  $this->tabs_gui->setBackTarget(
150  $this->lng->txt("back"),
151  $this->ctrl->getLinkTarget($this, "view")
152  );
153 
154  // needed for editor
155  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
156 
157  $ret = $this->ctrl->forwardCommand($page_gui);
158  if ($ret != "" && $ret !== true) {
159  // preview (fullscreen)
160  if ($this->page_mode === "preview") {
161  // embedded call which did not generate any output (e.g. calendar month navigation)
163  // suppress (portfolio) notes for blog postings
164  $this->preview(false, $ret, ($a_cmd !== "previewEmbedded"));
165  } else {
166  $this->preview(false);
167  }
168  }
169  // edit
170  else {
171  $this->setContentStyleSheet();
172  if (is_string($ret)) {
173  $this->tpl->setContent($ret);
174  }
175  }
176  }
177  }
getPageGUIInstance(int $a_page_id)
preview()
description: > Example for rendering a Preview Glyph.
Definition: preview.php:41
setContentStyleSheet(?ilGlobalTemplateInterface $a_tpl=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

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

Referenced by copyPage(), and copyPageForm().

919  {
920  $form = new ilPropertyFormGUI();
921  $form->setFormAction($this->ctrl->getFormAction($this));
922  $form->setTitle($this->lng->txt("prtf_copy_page"));
923 
924  $this->initCopyPageFormOptions($form);
925 
926  $form->addCommandButton("copyPage", $this->lng->txt("save"));
927  $form->addCommandButton("view", $this->lng->txt("cancel"));
928 
929  return $form;
930  }
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
abstractprotected

Referenced by copyPage(), and initCopyPageForm().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

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

Referenced by ilObjPortfolioGUI\initEditForm().

228  : void
229  {
230  $this->setSettingsSubTabs("properties");
231 
232 
233  // profile picture
234  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
235  $a_form->addItem($ppic);
236 
237  $prfa_set = new ilSetting("prfa");
238 
239  $section = new ilFormSectionHeaderGUI();
240  $section->setTitle($this->lng->txt('obj_features'));
241  $a_form->addItem($section);
242 
243  // comments
244  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
245  $a_form->addItem($comments);
246 
247  /* #15000
248  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
249  $a_form->addItem($bg_color);
250 
251  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
252  $a_form->addItem($font_color);
253  */
254  }
$comments
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPageForm()

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

Init portfolio page form.

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

References ilPageLayout\activeLayouts(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilPageLayout\MODULE_PORTFOLIO, ilFormPropertyGUI\setRequired(), and ilRadioOption\setTitle().

Referenced by addPage(), and savePage().

407  {
408  $form = new ilPropertyFormGUI();
409  $form->setFormAction($this->ctrl->getFormAction($this));
410 
411  // title
412  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
413  $ti->setMaxLength(200);
414  $ti->setRequired(true);
415  $form->addItem($ti);
416 
417  // save and cancel commands
418  if ($a_mode === "create") {
420  if ($templates) {
421  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
422  $use_template->setRequired(true);
423  $form->addItem($use_template);
424 
425  $opt = new ilRadioOption($this->lng->txt("none"), 0);
426  $use_template->addOption($opt);
427 
428  foreach ($templates as $templ) {
429  $templ->readObject();
430 
431  $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
432  $use_template->addOption($opt);
433  }
434  }
435 
436  $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
437  $this->object->getTitle());
438  $form->addCommandButton("savePage", $this->lng->txt("save"));
439  $form->addCommandButton("view", $this->lng->txt("cancel"));
440  }
441 
442  return $form;
443  }
This class represents an option in a radio group.
static activeLayouts(int $a_module=0)
Get active layouts.
This class represents a property in a property form.
setRequired(bool $a_required)
setTitle(string $a_title)
+ Here is the call graph for this function:
+ Here is the caller 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 789 of file class.ilObjPortfolioBaseGUI.php.

References $DIC, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupName(), ilChangeEvent\_recordReadEvent(), ilObject\getId(), ilObject\getRefId(), ilObject\getTitle(), ilObject\getType(), ilObjPortfolioBase\hasProfilePicture(), null, ILIAS\UICore\GlobalTemplate\resetHeaderBlock(), ILIAS\UICore\GlobalTemplate\setDescription(), ILIAS\UICore\GlobalTemplate\setTitle(), ILIAS\UICore\GlobalTemplate\setTitleIcon(), and ILIAS\UICore\GlobalTemplate\setVariable().

794  : void {
795  global $DIC;
796 
797  $ilUser = $DIC->user();
798 
799  if (!$a_export) {
801  $a_portfolio->getType(),
802  ($a_portfolio->getType() === "prtt")
803  ? $a_portfolio->getRefId()
804  : $a_portfolio->getId(),
805  $a_portfolio->getId(),
806  $ilUser->getId()
807  );
808  }
809 
810  $name = ilObjUser::_lookupName($a_user_id);
811  $name = $name["lastname"] . ", " . (($t = $name["title"]) ? $t . " " : "") . $name["firstname"];
812 
813  $prfa_set = new ilSetting("prfa");
814 
815  // profile picture
816  $ppic = null;
817  if ($a_portfolio->hasProfilePicture()) {
818  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
819  if ($a_export) {
820  $ppic = basename($ppic);
821  }
822  }
823 
824  $a_tpl->resetHeaderBlock(false);
825  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
826  // @todo fix this
827  $a_tpl->setTitleIcon((string) $ppic);
828  $a_tpl->setTitle($a_portfolio->getTitle());
829  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
830  $a_tpl->setDescription($name);
831 
832  // to get rid of locator in portfolio template preview
833  $a_tpl->setVariable("LOCATOR", "");
834 
835  // :TODO: obsolete?
836  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
837  }
static _lookupName(int $a_user_id)
lookup user name
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
global $DIC
Definition: shib_login.php:26
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
static _getPersonalPicturePath(int $a_usr_id, string $a_size='small', bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), getPageInstance(), initPageForm(), ILIAS\Repository\lng(), and ilPortfolioPage\TYPE_PAGE.

448  : void
449  {
450  $form = $this->initPageForm("create");
451  if ($form->checkInput() && $this->checkPermissionBool("write")) {
452  $page = $this->getPageInstance();
453  $page->setType(ilPortfolioPage::TYPE_PAGE);
454  $page->setTitle($form->getInput("title"));
455 
456  // use template as basis
457  $layout_id = $form->getInput("tmpl");
458  if ($layout_id) {
459  $layout_obj = new ilPageLayout($layout_id);
460  $page->setXMLContent($layout_obj->copyXmlContent(false));
461  }
462 
463  $page->create();
464 
465  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_page_created"), true);
466  $this->ctrl->redirect($this, "view");
467  }
468 
469  $this->tabs_gui->clearTargets();
470  $this->tabs_gui->setBackTarget(
471  $this->lng->txt("back"),
472  $this->ctrl->getLinkTarget($this, "view")
473  );
474 
475  $form->setValuesByPost();
476  $this->tpl->setContent($form->getHTML());
477  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
initPageForm(string $a_mode="create")
Init portfolio page form.
+ Here is the call graph for this function:

◆ savePortfolioPagesOrdering()

ilObjPortfolioBaseGUI::savePortfolioPagesOrdering ( )

Save ordering of portfolio pages.

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

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilPortfolioPage\fixOrdering(), getPageInstance(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilUtil\stripSlashes().

482  : void
483  {
484  if (!$this->checkPermissionBool("write")) {
485  return;
486  }
487 
488  $title_changes = array();
489 
490  $order = $this->port_request->getOrder();
491  $titles = $this->port_request->getTitles();
492  if (count($order) > 0) {
493  foreach ($order as $k => $v) {
494  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
495  if ($titles[$k] ?? "") {
496  $new_title = $titles[$k] ?? "";
497  if ($page->getTitle() != $new_title) {
498  $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
499  $page->setTitle($new_title);
500  }
501  }
502  $page->setOrderNr(ilUtil::stripSlashes($v));
503  $page->update();
504  }
505  ilPortfolioPage::fixOrdering($this->object->getId());
506  }
507 
508  $this->object->fixLinksOnTitleChange($title_changes);
509 
510  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
511  $this->ctrl->redirect($this, "view");
512  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
static fixOrdering(int $a_portfolio_id)
+ Here is the call graph for this function:

◆ setAdditional()

ilObjPortfolioBaseGUI::setAdditional ( array  $a_additional)

Set Additonal Information (used in public profile?)

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

182  : void
183  {
184  $this->additional = $a_additional;
185  }

◆ setContentStyleSheet()

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

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

References ilObject2GUI\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), and ILIAS\Repository\object().

Referenced by deletePortfolioPages(), and handlePageCall().

939  : void {
940  $tpl = $this->tpl;
941 
942  if ($a_tpl) {
943  $ctpl = $a_tpl;
944  } else {
945  $ctpl = $tpl;
946  }
947 
948  $this->content_style_gui->addCss(
949  $ctpl,
950  $this->object->getRefId(),
951  $this->object->getId()
952  );
953  }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ 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 195 of file class.ilObjPortfolioBaseGUI.php.

198  : void {
199  $this->perma_link = array("obj_id" => $a_obj_id, "type" => $a_type);
200  }

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs ( string  $a_active)
protected

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

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

Referenced by ilObjPortfolioTemplateGUI\executeCommand(), ilObjPortfolioGUI\executeCommand(), and initEditCustomForm().

207  : void
208  {
209  // #17455
210  $this->lng->loadLanguageModule($this->getType());
211 
212  // general properties
213  $this->tabs_gui->addSubTab(
214  "properties",
215  $this->lng->txt($this->getType() . "_properties"),
216  $this->ctrl->getLinkTarget($this, 'edit')
217  );
218 
219  $this->tabs_gui->addSubTab(
220  "style",
221  $this->lng->txt("obj_sty"),
222  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
223  );
224 
225  $this->tabs_gui->activateSubTab($a_active);
226  }
getType()
Functions that must be overwritten.
+ 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 750 of file class.ilObjPortfolioBaseGUI.php.

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObject2GUI\getType(), ILIAS\Repository\lng(), ilPortfolioPage\lookupType(), null, ILIAS\Repository\toolbar(), ilPortfolioPage\TYPE_PAGE, and ILIAS\Repository\ui().

Referenced by deletePortfolioPages().

752  : void {
753  $page_class = ($this->getType() === "prtt")
754  ? "ilPortfolioTemplatePageGUI"
755  : "ilportfoliopagegui";
756  $button = null;
757  if ($this->checkPermissionBool("write") &&
759  if ($this->getType() === "prtt") {
760  $button = $this->ui->factory()->button()->standard(
761  $this->lng->txt("prtt_edit"),
762  $this->ctrl->getLinkTargetByClass(["ilobjportfoliotemplategui"], "view")
763  );
764  } else {
765  $button = $this->ui->factory()->button()->standard(
766  $this->lng->txt("prtf_edit_portfolio"),
767  $this->ctrl->getLinkTargetByClass(["ilobjportfoliogui"], "view")
768  );
769  }
770  $this->toolbar->addComponent($button);
771  $button = null;
772  }
774  $this->ctrl->setParameterByClass($page_class, "ppage", $page_id);
775  $button = $this->ui->factory()->button()->standard(
776  $this->lng->txt("edit_page"),
777  $this->ctrl->getLinkTargetByClass($page_class, "edit")
778  );
779  if ($this->checkPermissionBool("write")) {
780  $this->toolbar->addComponent($button);
781  }
782  $button = null;
783  }
784  if ($button && $this->checkPermissionBool("write")) {
785  $this->tpl->setHeaderActionMenu($this->ui->renderer()->render($button));
786  }
787  }
static lookupType($a_page_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

References ilPropertyFormGUI\getInput(), getPageGUIClassName(), getPageGUIInstance(), getPageInstance(), and null.

266  : void
267  {
268  $this->object->setPublicComments($form->getInput("comments"));
269  $this->object->setProfilePicture($form->getInput("ppic"));
270  $prfa_set = new ilSetting("prfa");
271  }
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()

ilObjPortfolioBaseGUI::view ( )

Show list of portfolio pages.

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

References $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$object, $provider, ilObjectGUI\$settings, ilObject2GUI\$toolbar, $ui, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilPortfolioPage\getAllPortfolioPages(), ILIAS\Survey\Mode\getId(), ilObjectGUI\getObject(), ilObject2GUI\getType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

290  : void
291  {
292  $ilToolbar = $this->toolbar;
294  $lng = $this->lng;
295 
296  if (!$this->checkPermissionBool("write")) {
297  $this->ctrl->redirect($this, "infoScreen");
298  }
299 
300  $this->tabs_gui->activateTab("pages");
301 
303 
304  $this->gui->button(
305  $this->lng->txt("prtf_add_page"),
306  $this->ctrl->getLinkTarget($this, "addPage")
307  )->toToolbar(true);
308 
309 
310  // #16571
311  $modal_html = "";
312  if ($this->getType() === "prtf" && count($pages) > 0) {
313  $ilToolbar->addSeparator();
314 
315  $ui = $this->ui;
316 
317  if ($this->object->isCommentsExportPossible()) {
318  $this->lng->loadLanguageModule("note");
319  $comment_export_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
320  $comment_modal = $comment_export_helper->getCommentIncludeModalDialog(
321  $this->lng->txt("export_html"),
322  $this->lng->txt("note_html_export_include_comments"),
323  $this->ctrl->getLinkTarget($this, "export"),
324  $this->ctrl->getLinkTarget($this, "exportWithComments")
325  );
326  $button = $ui->factory()->button()->standard($this->lng->txt("export_html"), '')
327  ->withOnClick($comment_modal->getShowSignal());
328  $ilToolbar->addComponent($button);
329  $modal_html = $ui->renderer()->render($comment_modal);
330  } else {
331  $this->gui->button(
332  $this->lng->txt("export_html"),
333  $this->ctrl->getLinkTarget($this, "export")
334  )->toToolbar();
335  }
336 
337  $print_view = $this->getPrintView();
338  $modal_elements = $print_view->getModalElements($this->ctrl->getLinkTarget(
339  $this,
340  "printSelection"
341  ));
342  $modal_html .= $ui->renderer()->render($modal_elements->modal);
343  $ilToolbar->addComponent($modal_elements->button);
344  }
345 
346  $table = new ilPortfolioPageTableGUI($this, "view");
347 
348 
349  $this->tpl->setContent($table->getHTML() . $modal_html);
350  }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
ilToolbarGUI $toolbar
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
getType()
Functions that must be overwritten.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:31
ilSetting $settings
+ Here is the call graph for this function:

Field Documentation

◆ $additional

array ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjPortfolioBaseGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjPortfolioBaseGUI::$content_style_gui
protected

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

◆ $gui

ILIAS Portfolio InternalGUIService ilObjPortfolioBaseGUI::$gui
protected

◆ $help

ilHelpGUI ilObjPortfolioBaseGUI::$help
protected

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

Referenced by addPage(), and ilObjPortfolioGUI\setTabs().

◆ $notes

ILIAS Notes Service ilObjPortfolioBaseGUI::$notes
protected

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

◆ $page_id

int ilObjPortfolioBaseGUI::$page_id = 0
protected

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

◆ $page_mode

string ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

array ilObjPortfolioBaseGUI::$perma_link = []
protected

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

◆ $port_request

StandardGUIRequest ilObjPortfolioBaseGUI::$port_request
protected

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

◆ $requested_back_url

string ilObjPortfolioBaseGUI::$requested_back_url = ""
protected

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

Referenced by deletePortfolioPages().

◆ $requested_ppage

int ilObjPortfolioBaseGUI::$requested_ppage
protected

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

Referenced by determinePageCall().

◆ $requested_user_page

int ilObjPortfolioBaseGUI::$requested_user_page
protected

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

Referenced by determinePageCall().

◆ $ui

ILIAS DI UIServices ilObjPortfolioBaseGUI::$ui
protected

◆ $user_id

int ilObjPortfolioBaseGUI::$user_id = 0
protected

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


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