ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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

Protected Attributes

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

Additional Inherited Members

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

References $DIC, $ilUser, ILIAS\GlobalScreen\Provider\__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().

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

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

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

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

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

96  : void
97  {
98  $ilLocator = $this->locator;
99 
100  if ($this->object) {
101  $ilLocator->addItem(
102  strip_tags($this->object->getTitle()),
103  $this->ctrl->getLinkTarget($this, "view")
104  );
105  }
106 
107  if ($this->page_id > 0) {
108  $page = $this->getPageInstance($this->page_id);
109  $title = $page->getTitle();
110  if ($page->getType() === ilPortfolioPage::TYPE_BLOG) {
111  $title = ilObject::_lookupTitle($title);
112  }
113  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
114  $ilLocator->addItem(
115  $title,
116  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
117  );
118  }
119  }
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 417 of file class.ilObjPortfolioBaseGUI.php.

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

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

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

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

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

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

954  : void
955  {
956  $form = $this->initCopyPageForm();
957  if ($form->checkInput()) {
958  // existing
959  if ($form->getInput("target") === "old") {
960  $portfolio_id = $form->getInput("prtf");
961  }
962  // new
963  else {
964  $portfolio = new ilObjPortfolio();
965  $portfolio->setTitle($form->getInput("title"));
966  $portfolio->create();
967  $portfolio_id = $portfolio->getId();
968  }
969 
970  // copy page(s)
971  $page_ids = $this->port_request->getPortfolioPageIds();
972  foreach ($page_ids as $page_id) {
973  $source = $this->getPageInstance($page_id);
974  $target = $this->getPageInstance(null, $portfolio_id);
975  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
976  $target->setType($source->getType());
977  $target->setTitle($source->getTitle());
978  $target->create();
979  }
980 
981  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_pages_copied"), true);
982  $this->ctrl->redirect($this, "view");
983  }
984 
985  $form->setValuesByPost();
986  $this->copyPageForm($form);
987  }
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.
$source
Definition: metadata.php:93
+ 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 929 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by copyPage().

931  : void {
932  $prtf_pages = $this->port_request->getPortfolioPageIds();
933 
934  if (count($prtf_pages) === 0) {
935  $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_checkbox"), true);
936  $this->ctrl->redirect($this, "view");
937  } else {
938  $this->tabs_gui->activateTab("pages");
939 
940  if (!$a_form) {
941  $a_form = $this->initCopyPageForm();
942  }
943 
944  foreach ($prtf_pages as $page_id) {
945  $item = new ilHiddenInputGUI("prtf_pages[]");
946  $item->setValue($page_id);
947  $a_form->addItem($item);
948  }
949 
950  $this->tpl->setContent($a_form->getHTML());
951  }
952  }
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 603 of file class.ilObjPortfolioBaseGUI.php.

References ilObjectGUI\$id, $ilSetting, $ilUser, ilObjectGUI\$object, ilObject2GUI\$parent_id, $requested_back_url, $requested_user_page, ilObjectGUI\$settings, ilObjectGUI\$tree, ilObject2GUI\$user, ilLink\_getStaticLink(), ilObject\_lookupTitle(), ANONYMOUS_USER_ID, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilPortfolioPage\getAllPortfolioPages(), ilObject\getId(), getPageGUIInstance(), getPageInstance(), ilTree\getParentId(), ilObject2GUI\getType(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\object(), setContentStyleSheet(), showEditButton(), and ilPortfolioPage\TYPE_BLOG.

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

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

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

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

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

Referenced by exportWithComments().

913  : void {
914  $port_export = new \ILIAS\Portfolio\Export\PortfolioHtmlExport($this);
915  $port_export->includeComments($a_with_comments);
916  $zip = $port_export->exportHtml();
917 
918  ilFileDelivery::deliverFileLegacy($zip, $this->object->getTitle() . ".zip", '', false, true);
919  }
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 921 of file class.ilObjPortfolioBaseGUI.php.

References export().

921  : void
922  {
923  $this->export(true);
924  }
export(bool $a_with_comments=false)
+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

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

References $additional.

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

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

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

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

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

142  : void
143  {
144  if (!$this->page_id) {
145  $this->ctrl->redirect($this, "view");
146  }
147 
148  $page_gui = $this->getPageGUIInstance($this->page_id);
149 
150  $this->tabs_gui->clearTargets();
151  $this->tabs_gui->setBackTarget(
152  $this->lng->txt("back"),
153  $this->ctrl->getLinkTarget($this, "view")
154  );
155 
156  // needed for editor
157  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
158 
159  $ret = $this->ctrl->forwardCommand($page_gui);
160  if ($ret != "" && $ret !== true) {
161  // preview (fullscreen)
162  if ($this->page_mode === "preview") {
163  // embedded call which did not generate any output (e.g. calendar month navigation)
165  // suppress (portfolio) notes for blog postings
166  $this->preview(false, $ret, ($a_cmd !== "previewEmbedded"));
167  } else {
168  $this->preview(false);
169  }
170  }
171  // edit
172  else {
173  $this->setContentStyleSheet();
174  if (is_string($ret)) {
175  $this->tpl->setContent($ret);
176  }
177  }
178  }
179  }
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 991 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by copyPage(), and copyPageForm().

992  {
993  $form = new ilPropertyFormGUI();
994  $form->setFormAction($this->ctrl->getFormAction($this));
995  $form->setTitle($this->lng->txt("prtf_copy_page"));
996 
997  $this->initCopyPageFormOptions($form);
998 
999  $form->addCommandButton("copyPage", $this->lng->txt("save"));
1000  $form->addCommandButton("view", $this->lng->txt("cancel"));
1001 
1002  return $form;
1003  }
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 230 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilObjPortfolioGUI\initEditForm().

230  : void
231  {
232  $this->setSettingsSubTabs("properties");
233 
234 
235  // profile picture
236  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
237  $a_form->addItem($ppic);
238 
239  $prfa_set = new ilSetting("prfa");
240  if ($prfa_set->get("banner")) {
241  $dimensions = " (" . $prfa_set->get("banner_width") . "x" .
242  $prfa_set->get("banner_height") . ")";
243 
244  $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner") . $dimensions, "banner");
245  $a_form->addItem($img);
246 
247  // show existing file
248  $file = $this->object->getImageFullPath(true);
249  if ($file) {
250  $img->setImage(ilWACSignedPath::signFile($file));
251  }
252  }
253 
254  $section = new ilFormSectionHeaderGUI();
255  $section->setTitle($this->lng->txt('obj_features'));
256  $a_form->addItem($section);
257 
258  // comments
259  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
260  $a_form->addItem($comments);
261 
262  /* #15000
263  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
264  $a_form->addItem($bg_color);
265 
266  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
267  $a_form->addItem($font_color);
268  */
269  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a checkbox property in a property form.
$comments
$img
Definition: imgupload.php:83
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 438 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().

439  {
440  $form = new ilPropertyFormGUI();
441  $form->setFormAction($this->ctrl->getFormAction($this));
442 
443  // title
444  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
445  $ti->setMaxLength(200);
446  $ti->setRequired(true);
447  $form->addItem($ti);
448 
449  // save and cancel commands
450  if ($a_mode === "create") {
452  if ($templates) {
453  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
454  $use_template->setRequired(true);
455  $form->addItem($use_template);
456 
457  $opt = new ilRadioOption($this->lng->txt("none"), 0);
458  $use_template->addOption($opt);
459 
460  foreach ($templates as $templ) {
461  $templ->readObject();
462 
463  $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
464  $use_template->addOption($opt);
465  }
466  }
467 
468  $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
469  $this->object->getTitle());
470  $form->addCommandButton("savePage", $this->lng->txt("save"));
471  $form->addCommandButton("view", $this->lng->txt("cancel"));
472  }
473 
474  return $form;
475  }
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 850 of file class.ilObjPortfolioBaseGUI.php.

References $DIC, $ilUser, $name, 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().

855  : void {
856  global $DIC;
857 
858  $ilUser = $DIC->user();
859 
860  if (!$a_export) {
862  $a_portfolio->getType(),
863  ($a_portfolio->getType() === "prtt")
864  ? $a_portfolio->getRefId()
865  : $a_portfolio->getId(),
866  $a_portfolio->getId(),
867  $ilUser->getId()
868  );
869  }
870 
871  $name = ilObjUser::_lookupName($a_user_id);
872  $name = $name["lastname"] . ", " . (($t = $name["title"]) ? $t . " " : "") . $name["firstname"];
873 
874  // show banner?
875  $banner = $banner_width = $banner_height = false;
876  $prfa_set = new ilSetting("prfa");
877  if ($prfa_set->get("banner")) {
878  $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
879  $banner_width = $prfa_set->get("banner_width");
880  $banner_height = $prfa_set->get("banner_height");
881  if ($a_export) {
882  $banner = basename($banner);
883  }
884  }
885 
886  // profile picture
887  $ppic = null;
888  if ($a_portfolio->hasProfilePicture()) {
889  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
890  if ($a_export) {
891  $ppic = basename($ppic);
892  }
893  }
894 
895  $a_tpl->resetHeaderBlock(false);
896  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
897  // @todo fix this
898  $a_tpl->setBanner($banner);
899  $a_tpl->setTitleIcon((string) $ppic);
900  $a_tpl->setTitle($a_portfolio->getTitle());
901  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
902  $a_tpl->setDescription($name);
903 
904  // to get rid of locator in portfolio template preview
905  $a_tpl->setVariable("LOCATOR", "");
906 
907  // :TODO: obsolete?
908  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
909  }
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
if($format !==null) $name
Definition: metadata.php:247
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.
$ilUser
Definition: imgupload.php:34
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 480 of file class.ilObjPortfolioBaseGUI.php.

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

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

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

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

184  : void
185  {
186  $this->additional = $a_additional;
187  }

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

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

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

Referenced by deletePortfolioPages(), and handlePageCall().

1012  : void {
1013  $tpl = $this->tpl;
1014 
1015  if ($a_tpl) {
1016  $ctpl = $a_tpl;
1017  } else {
1018  $ctpl = $tpl;
1019  }
1020 
1021  $this->content_style_gui->addCss(
1022  $ctpl,
1023  $this->object->getRefId(),
1024  $this->object->getId()
1025  );
1026  }
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 197 of file class.ilObjPortfolioBaseGUI.php.

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

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs ( string  $a_active)
protected

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

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

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

209  : void
210  {
211  // #17455
212  $this->lng->loadLanguageModule($this->getType());
213 
214  // general properties
215  $this->tabs_gui->addSubTab(
216  "properties",
217  $this->lng->txt($this->getType() . "_properties"),
218  $this->ctrl->getLinkTarget($this, 'edit')
219  );
220 
221  $this->tabs_gui->addSubTab(
222  "style",
223  $this->lng->txt("obj_sty"),
224  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
225  );
226 
227  $this->tabs_gui->activateSubTab($a_active);
228  }
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 808 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().

810  : void {
811  $page_class = ($this->getType() === "prtt")
812  ? "ilPortfolioTemplatePageGUI"
813  : "ilportfoliopagegui";
814  $button = null;
815  if ($this->checkPermissionBool("write") &&
817  if ($this->getType() === "prtt") {
818  $button = $this->ui->factory()->button()->standard(
819  $this->lng->txt("prtt_edit"),
820  $this->ctrl->getLinkTargetByClass(["ilobjportfoliotemplategui"], "view")
821  );
822  } else {
823  $button = $this->ui->factory()->button()->standard(
824  $this->lng->txt("prtf_edit_portfolio"),
825  $this->ctrl->getLinkTargetByClass(["ilobjportfoliogui"], "view")
826  );
827  }
828  $this->toolbar->addComponent($button);
829  $button = null;
830  }
832  $this->ctrl->setParameterByClass($page_class, "ppage", $page_id);
833  $button = $this->ui->factory()->button()->standard(
834  $this->lng->txt("edit_page"),
835  $this->ctrl->getLinkTargetByClass($page_class, "edit")
836  );
837  if ($this->checkPermissionBool("write")) {
838  $this->toolbar->addComponent($button);
839  }
840  $button = null;
841  }
842  if ($button && $this->checkPermissionBool("write")) {
843  $this->tpl->setHeaderActionMenu($this->ui->renderer()->render($button));
844  }
845  }
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 281 of file class.ilObjPortfolioBaseGUI.php.

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

281  : void
282  {
283  $this->object->setPublicComments($form->getInput("comments"));
284  $this->object->setProfilePicture($form->getInput("ppic"));
285  /*
286  $this->object->setBackgroundColor($a_form->getInput("bg_color"));
287  $this->object->setFontcolor($a_form->getInput("font_color"));
288  */
289 
290  $prfa_set = new ilSetting("prfa");
291 
292  if (isset($_FILES["banner"]) && $_FILES["banner"]["tmp_name"]) {
293  $this->object->uploadImage($_FILES["banner"]);
294  } elseif ($prfa_set->get('banner') && $form->getItemByPostVar("banner")->getDeletionFlag()) {
295  $this->object->deleteImage();
296  }
297  }
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 316 of file class.ilObjPortfolioBaseGUI.php.

References $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$object, $provider, ilObjectGUI\$settings, ilObject2GUI\$toolbar, $ui, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilLinkButton\getInstance(), ilObject2GUI\getType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

316  : void
317  {
318  $ilToolbar = $this->toolbar;
320  $lng = $this->lng;
321 
322  if (!$this->checkPermissionBool("write")) {
323  $this->ctrl->redirect($this, "infoScreen");
324  }
325 
326  $this->tabs_gui->activateTab("pages");
327 
328 
329  $button = ilLinkButton::getInstance();
330  $button->setCaption("prtf_add_page");
331  $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
332  $ilToolbar->addStickyItem($button);
333 
334  if (!$ilSetting->get('disable_wsp_blogs')) {
335  $button = ilLinkButton::getInstance();
336  $button->setCaption("prtf_add_blog");
337  $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
338  $ilToolbar->addStickyItem($button);
339  }
340 
341 
342  // #16571
343  $modal_html = "";
344  if ($this->getType() === "prtf") {
345  $ilToolbar->addSeparator();
346 
347  $ui = $this->ui;
348 
349  if ($this->object->isCommentsExportPossible()) {
350  $this->lng->loadLanguageModule("note");
351  $comment_export_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
352  $comment_modal = $comment_export_helper->getCommentIncludeModalDialog(
353  $this->lng->txt("export_html"),
354  $this->lng->txt("note_html_export_include_comments"),
355  $this->ctrl->getLinkTarget($this, "export"),
356  $this->ctrl->getLinkTarget($this, "exportWithComments")
357  );
358  $button = $ui->factory()->button()->standard($this->lng->txt("export_html"), '')
359  ->withOnClick($comment_modal->getShowSignal());
360  $ilToolbar->addComponent($button);
361  $modal_html = $ui->renderer()->render($comment_modal);
362  } else {
363  $button = ilLinkButton::getInstance();
364  $button->setCaption("export_html");
365  $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
366  $ilToolbar->addButtonInstance($button);
367  }
368 
369  $print_view = $this->getPrintView();
370  $modal_elements = $print_view->getModalElements($this->ctrl->getLinkTarget(
371  $this,
372  "printSelection"
373  ));
374  $modal_html .= $ui->renderer()->render($modal_elements->modal);
375  $ilToolbar->addComponent($modal_elements->button);
376  }
377 
378  $table = new ilPortfolioPageTableGUI($this, "view");
379 
380 
381  $this->tpl->setContent($table->getHTML() . $modal_html);
382  }
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:17
ilSetting $settings
+ Here is the call graph for this function:

Field Documentation

◆ $additional

array ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjPortfolioBaseGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjPortfolioBaseGUI::$content_style_gui
protected

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

◆ $help

ilHelpGUI ilObjPortfolioBaseGUI::$help
protected

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

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

◆ $http

ILIAS HTTP Services ilObjPortfolioBaseGUI::$http
protected

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

◆ $page_id

int ilObjPortfolioBaseGUI::$page_id = 0
protected

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

◆ $page_mode

string ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

array ilObjPortfolioBaseGUI::$perma_link = []
protected

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

◆ $port_request

StandardGUIRequest ilObjPortfolioBaseGUI::$port_request
protected

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

◆ $requested_back_url

string ilObjPortfolioBaseGUI::$requested_back_url = ""
protected

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

Referenced by deletePortfolioPages().

◆ $requested_ppage

int ilObjPortfolioBaseGUI::$requested_ppage
protected

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

Referenced by determinePageCall().

◆ $requested_user_page

int ilObjPortfolioBaseGUI::$requested_user_page
protected

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

Referenced by deletePortfolioPages(), and determinePageCall().

◆ $ui

ILIAS DI UIServices ilObjPortfolioBaseGUI::$ui
protected

◆ $user_id

int ilObjPortfolioBaseGUI::$user_id = 0
protected

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


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