ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static renderFullscreenHeader (ilObjPortfolioBase $a_portfolio, ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
 Render banner, user name. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

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...
 
 addBlog ()
 Show portfolio blog page creation form. More...
 
 initBlogForm ()
 
 saveBlog ()
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 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...
 

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 HTTP Services $http
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

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 46 of file class.ilObjPortfolioBaseGUI.php.

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

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

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

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

519  : void
520  {
521  $ilHelp = $this->help;
522 
523  $this->tabs_gui->clearTargets();
524  $this->tabs_gui->setBackTarget(
525  $this->lng->txt("back"),
526  $this->ctrl->getLinkTarget($this, "view")
527  );
528 
529  $ilHelp->setScreenIdComponent("prtf");
530  $ilHelp->setScreenId("add_blog");
531 
532  $form = $this->initBlogForm();
533  $this->tpl->setContent($form->getHTML());
534  }
setScreenIdComponent(string $a_comp)
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

References ilObject2GUI\$locator, ilObject\_lookupTitle(), ilLocatorGUI\addItem(), ILIAS\Repository\ctrl(), getPageGUIClassName(), getPageInstance(), ILIAS\Repository\object(), and ilPortfolioPage\TYPE_BLOG.

Referenced by ilObjPortfolioGUI\addLocator().

100  : void
101  {
102  $ilLocator = $this->locator;
103 
104  if ($this->object) {
105  $ilLocator->addItem(
106  strip_tags($this->object->getTitle()),
107  $this->ctrl->getLinkTarget($this, "view")
108  );
109  }
110 
111  if ($this->page_id > 0) {
112  $page = $this->getPageInstance($this->page_id);
113  $title = $page->getTitle();
114  if ($page->getType() === ilPortfolioPage::TYPE_BLOG) {
115  $title = ilObject::_lookupTitle($title);
116  }
117  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
118  $ilLocator->addItem(
119  $title,
120  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
121  );
122  }
123  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
static _lookupTitle(int $obj_id)
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=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 422 of file class.ilObjPortfolioBaseGUI.php.

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

422  : void
423  {
424  $ilHelp = $this->help;
425 
426  $this->tabs_gui->clearTargets();
427  $this->tabs_gui->setBackTarget(
428  $this->lng->txt("back"),
429  $this->ctrl->getLinkTarget($this, "view")
430  );
431 
432  $ilHelp->setScreenIdComponent("prtf");
433  $ilHelp->setScreenId("add_page");
434 
435 
436  $form = $this->initPageForm("create");
437  $this->tpl->setContent($form->getHTML());
438  }
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 575 of file class.ilObjPortfolioBaseGUI.php.

References ilObjectGUI\$id, ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), getPageInstance(), ILIAS\Repository\lng(), and ilPortfolioPage\TYPE_BLOG.

575  : void
576  {
577  $prtf_pages = $this->port_request->getPortfolioPageIds();
578 
579  if (count($prtf_pages) === 0) {
580  $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
581  $this->ctrl->redirect($this, "view");
582  } else {
583  $this->tabs_gui->activateTab("pages");
584 
585  $cgui = new ilConfirmationGUI();
586  $cgui->setFormAction($this->ctrl->getFormAction($this));
587  $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
588  $cgui->setCancel($this->lng->txt("cancel"), "view");
589  $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
590 
591  foreach ($prtf_pages as $id) {
592  $page = $this->getPageInstance($id);
593  if ($page->getPortfolioId() !== $this->object->getId()) {
594  continue;
595  }
596 
597  $title = $page->getTitle();
598  if ($page->getType() === ilPortfolioPage::TYPE_BLOG) {
599  $title = $this->lng->txt("obj_blog") . ": " . ilObject::_lookupTitle((int) $title);
600  }
601  $cgui->addItem("prtf_pages[]", $id, $title);
602  }
603 
604  $this->tpl->setContent($cgui->getHTML());
605  }
606  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

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

971  : void
972  {
973  $form = $this->initCopyPageForm();
974  if ($form->checkInput()) {
975  // existing
976  if ($form->getInput("target") === "old") {
977  $portfolio_id = $form->getInput("prtf");
978  }
979  // new
980  else {
981  $portfolio = new ilObjPortfolio();
982  $portfolio->setTitle($form->getInput("title"));
983  $portfolio->create();
984  $portfolio_id = $portfolio->getId();
985  }
986 
987  // copy page(s)
988  $page_ids = $this->port_request->getPortfolioPageIds();
989  foreach ($page_ids as $page_id) {
990  $source = $this->getPageInstance($page_id);
991  $target = $this->getPageInstance(null, $portfolio_id);
992  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
993  $target->setType($source->getType());
994  $target->setTitle($source->getTitle());
995  $target->create();
996  }
997 
998  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_pages_copied"), true);
999  $this->ctrl->redirect($this, "view");
1000  }
1001 
1002  $form->setValuesByPost();
1003  $this->copyPageForm($form);
1004  }
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...
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 946 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by copyPage().

948  : void {
949  $prtf_pages = $this->port_request->getPortfolioPageIds();
950 
951  if (count($prtf_pages) === 0) {
952  $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
953  $this->ctrl->redirect($this, "view");
954  } else {
955  $this->tabs_gui->activateTab("pages");
956 
957  if (!$a_form) {
958  $a_form = $this->initCopyPageForm();
959  }
960 
961  foreach ($prtf_pages as $page_id) {
962  $item = new ilHiddenInputGUI("prtf_pages[]");
963  $item->setValue($page_id);
964  $a_form->addItem($item);
965  }
966 
967  $this->tpl->setContent($a_form->getHTML());
968  }
969  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Definition at line 608 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(), ilObject\_lookupTitle(), ANONYMOUS_USER_ID, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilPortfolioPage\getAllPortfolioPages(), getCommentGUI(), getCurrentPage(), ilObject\getId(), getPageGUIInstance(), getPageInstance(), ilTree\getParentId(), ilObject2GUI\getType(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\object(), setContentStyleSheet(), showEditButton(), and ilPortfolioPage\TYPE_BLOG.

608  : void
609  {
610  if (!$this->checkPermissionBool("write")) {
611  return;
612  }
613 
614  $page_ids = $this->port_request->getPortfolioPageIds();
615  foreach ($page_ids as $id) {
616  $page = $this->getPageInstance($id);
617  $page->delete();
618  }
619  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_portfolio_page_deleted"), true);
620  $this->ctrl->redirect($this, "view");
621  }
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 125 of file class.ilObjPortfolioBaseGUI.php.

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

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

125  : bool
126  {
127  // edit
128  if ($this->requested_ppage > 0) {
129  if (!$this->checkPermissionBool("write")) {
130  $this->ctrl->redirect($this, "view");
131  }
132 
133  $this->page_id = $this->requested_ppage;
134  $this->page_mode = "edit";
135  $this->ctrl->setParameter($this, "ppage", $this->page_id);
136  return true;
137  }
138 
139  // preview
140  $this->page_id = $this->requested_user_page;
141  $this->page_mode = "preview";
142  $this->ctrl->setParameter($this, "user_page", $this->page_id);
143  return false;
144  }
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 928 of file class.ilObjPortfolioBaseGUI.php.

References ilFileDelivery\deliverFileLegacy(), and ILIAS\Repository\object().

Referenced by exportWithComments().

930  : void {
931  $port_export = new \ILIAS\Portfolio\Export\PortfolioHtmlExport($this);
932  $port_export->includeComments($a_with_comments);
933  $zip = $port_export->exportHtml();
934 
935  ilFileDelivery::deliverFileLegacy($zip, $this->object->getTitle() . ".zip", '', false, true);
936  }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportWithComments()

ilObjPortfolioBaseGUI::exportWithComments ( )

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

References export().

938  : void
939  {
940  $this->export(true);
941  }
export(bool $a_with_comments=false)
+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

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

References $additional.

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

193  : array
194  {
195  return $this->additional;
196  }
+ Here is the caller graph for this function:

◆ getCommentGUI()

ilObjPortfolioBaseGUI::getCommentGUI ( )
protected

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

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

Referenced by deletePortfolioPages().

812  : ilCommentGUI
813  {
814  $gui = $this->notes->gui()->getCommentsGUI(
815  $this->object->getId(),
816  $this->getCurrentPage(),
817  "pfpg"
818  );
819  $gui->setRepositoryMode(false);
820  $gui->enablePublicNotesDeletion(($this->user_id === $this->object->getOwner()) &&
821  $this->settings->get("comments_del_tutor", '1'));
822  return $gui;
823  }
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 784 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by deletePortfolioPages(), and getCommentGUI().

784  : ?int
785  {
786  $pages = ilPortfolioPage::getAllPortfolioPages($this->object->getId());
787  $current_page = (int) $this->requested_user_page;
788 
789  // validate current page
790  if ($pages && $current_page) {
791  $found = false;
792  foreach ($pages as $page) {
793  if ((int) $page["id"] === $current_page) {
794  $found = true;
795  break;
796  }
797  }
798  if (!$found) {
799  $current_page = null;
800  }
801  }
802 
803  // display first page of portfolio if none given
804  if (!$current_page && $pages) {
805  $current_page = $pages;
806  $current_page = array_shift($current_page);
807  $current_page = (int) $current_page["id"];
808  }
809  return $current_page;
810  }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
+ 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 275 of file class.ilObjPortfolioBaseGUI.php.

275  : void
276  {
277  $a_values["comments"] = $this->object->hasPublicComments();
278  $a_values["ppic"] = $this->object->hasProfilePicture();
279  /*
280  $a_values["bg_color"] = $this->object->getBackgroundColor();
281  $a_values["font_color"] = $this->object->getFontColor();
282  */
283  }

◆ 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 146 of file class.ilObjPortfolioBaseGUI.php.

References ILIAS\Repository\ctrl(), ilPortfolioPageGUI\EMBEDDED_NO_OUTPUT, getPageGUIInstance(), ILIAS\Repository\lng(), and setContentStyleSheet().

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

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

◆ initBlogForm()

ilObjPortfolioBaseGUI::initBlogForm ( )
abstractprotected

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

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

Referenced by copyPage(), and copyPageForm().

1009  {
1010  $form = new ilPropertyFormGUI();
1011  $form->setFormAction($this->ctrl->getFormAction($this));
1012  $form->setTitle($this->lng->txt("prtf_copy_page"));
1013 
1014  $this->initCopyPageFormOptions($form);
1015 
1016  $form->addCommandButton("copyPage", $this->lng->txt("save"));
1017  $form->addCommandButton("view", $this->lng->txt("cancel"));
1018 
1019  return $form;
1020  }
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 234 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilObjPortfolioGUI\initEditForm().

234  : void
235  {
236  $this->setSettingsSubTabs("properties");
237 
238 
239  // profile picture
240  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
241  $a_form->addItem($ppic);
242 
243  $prfa_set = new ilSetting("prfa");
244  if ($prfa_set->get("banner")) {
245  $dimensions = " (" . $prfa_set->get("banner_width") . "x" .
246  $prfa_set->get("banner_height") . ")";
247 
248  $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner") . $dimensions, "banner");
249  $a_form->addItem($img);
250 
251  // show existing file
252  $file = $this->object->getImageFullPath(true);
253  if ($file) {
254  $img->setImage(ilWACSignedPath::signFile($file));
255  }
256  }
257 
258  $section = new ilFormSectionHeaderGUI();
259  $section->setTitle($this->lng->txt('obj_features'));
260  $a_form->addItem($section);
261 
262  // comments
263  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
264  $a_form->addItem($comments);
265 
266  /* #15000
267  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
268  $a_form->addItem($bg_color);
269 
270  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
271  $a_form->addItem($font_color);
272  */
273  }
$comments
This class represents an image file property in a property form.
static signFile(string $path_to_file)
+ 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 443 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().

444  {
445  $form = new ilPropertyFormGUI();
446  $form->setFormAction($this->ctrl->getFormAction($this));
447 
448  // title
449  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
450  $ti->setMaxLength(200);
451  $ti->setRequired(true);
452  $form->addItem($ti);
453 
454  // save and cancel commands
455  if ($a_mode === "create") {
457  if ($templates) {
458  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
459  $use_template->setRequired(true);
460  $form->addItem($use_template);
461 
462  $opt = new ilRadioOption($this->lng->txt("none"), 0);
463  $use_template->addOption($opt);
464 
465  foreach ($templates as $templ) {
466  $templ->readObject();
467 
468  $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
469  $use_template->addOption($opt);
470  }
471  }
472 
473  $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
474  $this->object->getTitle());
475  $form->addCommandButton("savePage", $this->lng->txt("save"));
476  $form->addCommandButton("view", $this->lng->txt("cancel"));
477  }
478 
479  return $form;
480  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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

Render banner, user name.

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

References $DIC, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupName(), ilChangeEvent\_recordReadEvent(), ilObject\getId(), ilObjPortfolioBase\getImageFullPath(), ilObject\getRefId(), ilObject\getTitle(), ilObject\getType(), ilObjPortfolioBase\hasProfilePicture(), ilGlobalTemplateInterface\resetHeaderBlock(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), ilGlobalTemplateInterface\setTitleIcon(), ilGlobalTemplateInterface\setVariable(), and ilWACSignedPath\signFile().

872  : void {
873  global $DIC;
874 
875  $ilUser = $DIC->user();
876 
877  if (!$a_export) {
879  $a_portfolio->getType(),
880  ($a_portfolio->getType() === "prtt")
881  ? $a_portfolio->getRefId()
882  : $a_portfolio->getId(),
883  $a_portfolio->getId(),
884  $ilUser->getId()
885  );
886  }
887 
888  $name = ilObjUser::_lookupName($a_user_id);
889  $name = $name["lastname"] . ", " . (($t = $name["title"]) ? $t . " " : "") . $name["firstname"];
890 
891  // show banner?
892  $banner = $banner_width = $banner_height = false;
893  $prfa_set = new ilSetting("prfa");
894  if ($prfa_set->get("banner")) {
895  $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
896  $banner_width = $prfa_set->get("banner_width");
897  $banner_height = $prfa_set->get("banner_height");
898  if ($a_export) {
899  $banner = basename($banner);
900  }
901  }
902 
903  // profile picture
904  $ppic = null;
905  if ($a_portfolio->hasProfilePicture()) {
906  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
907  if ($a_export) {
908  $ppic = basename($ppic);
909  }
910  }
911 
912  $a_tpl->resetHeaderBlock(false);
913  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
914  // @todo fix this
915  $a_tpl->setBanner($banner);
916  $a_tpl->setTitleIcon((string) $ppic);
917  $a_tpl->setTitle($a_portfolio->getTitle());
918  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
919  $a_tpl->setDescription($name);
920 
921  // to get rid of locator in portfolio template preview
922  $a_tpl->setVariable("LOCATOR", "");
923 
924  // :TODO: obsolete?
925  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
926  }
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
static _lookupName(int $a_user_id)
lookup user name
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
global $DIC
Definition: feed.php:28
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)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
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.
static signFile(string $path_to_file)
getImageFullPath(bool $a_as_thumb=false)
Get banner image incl.
+ Here is the call graph for this function:

◆ saveBlog()

ilObjPortfolioBaseGUI::saveBlog ( )
abstractprotected

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

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

485  : void
486  {
487  $form = $this->initPageForm("create");
488  if ($form->checkInput() && $this->checkPermissionBool("write")) {
489  $page = $this->getPageInstance();
490  $page->setType(ilPortfolioPage::TYPE_PAGE);
491  $page->setTitle($form->getInput("title"));
492 
493  // use template as basis
494  $layout_id = $form->getInput("tmpl");
495  if ($layout_id) {
496  $layout_obj = new ilPageLayout($layout_id);
497  $page->setXMLContent($layout_obj->copyXmlContent(false));
498  }
499 
500  $page->create();
501 
502  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_page_created"), true);
503  $this->ctrl->redirect($this, "view");
504  }
505 
506  $this->tabs_gui->clearTargets();
507  $this->tabs_gui->setBackTarget(
508  $this->lng->txt("back"),
509  $this->ctrl->getLinkTarget($this, "view")
510  );
511 
512  $form->setValuesByPost();
513  $this->tpl->setContent($form->getHTML());
514  }
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 543 of file class.ilObjPortfolioBaseGUI.php.

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

543  : void
544  {
545  if (!$this->checkPermissionBool("write")) {
546  return;
547  }
548 
549  $title_changes = array();
550 
551  $order = $this->port_request->getOrder();
552  $titles = $this->port_request->getTitles();
553  if (count($order) > 0) {
554  foreach ($order as $k => $v) {
555  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
556  if ($titles[$k] ?? "") {
557  $new_title = $titles[$k] ?? "";
558  if ($page->getTitle() != $new_title) {
559  $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
560  $page->setTitle($new_title);
561  }
562  }
563  $page->setOrderNr(ilUtil::stripSlashes($v));
564  $page->update();
565  }
566  ilPortfolioPage::fixOrdering($this->object->getId());
567  }
568 
569  $this->object->fixLinksOnTitleChange($title_changes);
570 
571  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
572  $this->ctrl->redirect($this, "view");
573  }
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 188 of file class.ilObjPortfolioBaseGUI.php.

188  : void
189  {
190  $this->additional = $a_additional;
191  }

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

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

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

Referenced by deletePortfolioPages(), and handlePageCall().

1029  : void {
1030  $tpl = $this->tpl;
1031 
1032  if ($a_tpl) {
1033  $ctpl = $a_tpl;
1034  } else {
1035  $ctpl = $tpl;
1036  }
1037 
1038  $this->content_style_gui->addCss(
1039  $ctpl,
1040  $this->object->getRefId(),
1041  $this->object->getId()
1042  );
1043  }
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 201 of file class.ilObjPortfolioBaseGUI.php.

204  : void {
205  $this->perma_link = array("obj_id" => $a_obj_id, "type" => $a_type);
206  }

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs ( string  $a_active)
protected

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

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

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

213  : void
214  {
215  // #17455
216  $this->lng->loadLanguageModule($this->getType());
217 
218  // general properties
219  $this->tabs_gui->addSubTab(
220  "properties",
221  $this->lng->txt($this->getType() . "_properties"),
222  $this->ctrl->getLinkTarget($this, 'edit')
223  );
224 
225  $this->tabs_gui->addSubTab(
226  "style",
227  $this->lng->txt("obj_sty"),
228  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
229  );
230 
231  $this->tabs_gui->activateSubTab($a_active);
232  }
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 825 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by deletePortfolioPages().

827  : void {
828  $page_class = ($this->getType() === "prtt")
829  ? "ilPortfolioTemplatePageGUI"
830  : "ilportfoliopagegui";
831  $button = null;
832  if ($this->checkPermissionBool("write") &&
834  if ($this->getType() === "prtt") {
835  $button = $this->ui->factory()->button()->standard(
836  $this->lng->txt("prtt_edit"),
837  $this->ctrl->getLinkTargetByClass(["ilobjportfoliotemplategui"], "view")
838  );
839  } else {
840  $button = $this->ui->factory()->button()->standard(
841  $this->lng->txt("prtf_edit_portfolio"),
842  $this->ctrl->getLinkTargetByClass(["ilobjportfoliogui"], "view")
843  );
844  }
845  $this->toolbar->addComponent($button);
846  $button = null;
847  }
849  $this->ctrl->setParameterByClass($page_class, "ppage", $page_id);
850  $button = $this->ui->factory()->button()->standard(
851  $this->lng->txt("edit_page"),
852  $this->ctrl->getLinkTargetByClass($page_class, "edit")
853  );
854  if ($this->checkPermissionBool("write")) {
855  $this->toolbar->addComponent($button);
856  }
857  $button = null;
858  }
859  if ($button && $this->checkPermissionBool("write")) {
860  $this->tpl->setHeaderActionMenu($this->ui->renderer()->render($button));
861  }
862  }
static lookupType($a_page_id)
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 285 of file class.ilObjPortfolioBaseGUI.php.

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

285  : void
286  {
287  $this->object->setPublicComments($form->getInput("comments"));
288  $this->object->setProfilePicture($form->getInput("ppic"));
289  /*
290  $this->object->setBackgroundColor($a_form->getInput("bg_color"));
291  $this->object->setFontcolor($a_form->getInput("font_color"));
292  */
293 
294  $prfa_set = new ilSetting("prfa");
295 
296  if (isset($_FILES["banner"]) && $_FILES["banner"]["tmp_name"]) {
297  $this->object->uploadImage($_FILES["banner"]);
298  } elseif ($prfa_set->get('banner') && $form->getItemByPostVar("banner")->getDeletionFlag()) {
299  $this->object->deleteImage();
300  }
301  }
getItemByPostVar(string $a_post_var)
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 320 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(), ILIAS\Repository\object(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

320  : void
321  {
322  $ilToolbar = $this->toolbar;
324  $lng = $this->lng;
325 
326  if (!$this->checkPermissionBool("write")) {
327  $this->ctrl->redirect($this, "infoScreen");
328  }
329 
330  $this->tabs_gui->activateTab("pages");
331 
333 
334  $this->gui->button(
335  $this->lng->txt("prtf_add_page"),
336  $this->ctrl->getLinkTarget($this, "addPage")
337  )->toToolbar(true);
338 
339  if (!$ilSetting->get('disable_wsp_blogs')) {
340  $this->gui->button(
341  $this->lng->txt("prtf_add_blog"),
342  $this->ctrl->getLinkTarget($this, "addBlog")
343  )->toToolbar(true);
344  }
345 
346 
347  // #16571
348  $modal_html = "";
349  if ($this->getType() === "prtf" && count($pages) > 0) {
350  $ilToolbar->addSeparator();
351 
352  $ui = $this->ui;
353 
354  if ($this->object->isCommentsExportPossible()) {
355  $this->lng->loadLanguageModule("note");
356  $comment_export_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
357  $comment_modal = $comment_export_helper->getCommentIncludeModalDialog(
358  $this->lng->txt("export_html"),
359  $this->lng->txt("note_html_export_include_comments"),
360  $this->ctrl->getLinkTarget($this, "export"),
361  $this->ctrl->getLinkTarget($this, "exportWithComments")
362  );
363  $button = $ui->factory()->button()->standard($this->lng->txt("export_html"), '')
364  ->withOnClick($comment_modal->getShowSignal());
365  $ilToolbar->addComponent($button);
366  $modal_html = $ui->renderer()->render($comment_modal);
367  } else {
368  $this->gui->button(
369  $this->lng->txt("export_html"),
370  $this->ctrl->getLinkTarget($this, "export")
371  )->toToolbar();
372  }
373 
374  $print_view = $this->getPrintView();
375  $modal_elements = $print_view->getModalElements($this->ctrl->getLinkTarget(
376  $this,
377  "printSelection"
378  ));
379  $modal_html .= $ui->renderer()->render($modal_elements->modal);
380  $ilToolbar->addComponent($modal_elements->button);
381  }
382 
383  $table = new ilPortfolioPageTableGUI($this, "view");
384 
385 
386  $this->tpl->setContent($table->getHTML() . $modal_html);
387  }
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:18
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 44 of file class.ilObjPortfolioBaseGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilObjPortfolioBaseGUI::$content_style_gui
protected

Definition at line 43 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 addBlog(), addPage(), and ilObjPortfolioGUI\setTabs().

◆ $http

ILIAS HTTP Services ilObjPortfolioBaseGUI::$http
protected

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

◆ $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: