ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

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

Protected Member Functions

 addLocatorItems ()
 
 determinePageCall ()
 
 handlePageCall (string $a_cmd)
 
 setSettingsSubTabs (string $a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 
 getPageGUIInstance (int $a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 getCurrentPage ()
 
 getCommentGUI ()
 
 showEditButton (int $page_id)
 
 initCopyPageFormOptions (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS Notes Service $notes
 
ILIAS Portfolio InternalGUIService $gui
 
StandardGUIRequest $port_request
 
ilHelpGUI $help
 
int $user_id = 0
 
array $additional = array()
 
array $perma_link = []
 
int $page_id = 0
 
string $page_mode
 
int $requested_ppage
 
int $requested_user_page
 
string $requested_back_url = ""
 
ILIAS DI UIServices $ui
 
ILIAS 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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Portfolio view gui base class.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

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

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  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
115  $ilLocator->addItem(
116  $title,
117  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
118  );
119  }
120  }
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

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

388  : void
389  {
390  $ilHelp = $this->help;
391 
392  $this->tabs_gui->clearTargets();
393  $this->tabs_gui->setBackTarget(
394  $this->lng->txt("back"),
395  $this->ctrl->getLinkTarget($this, "view")
396  );
397 
398  $ilHelp->setScreenIdComponent("prtf");
399  $ilHelp->setScreenId("add_page");
400 
401 
402  $form = $this->initPageForm("create");
403  $this->tpl->setContent($form->getHTML());
404  }
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 517 of file class.ilObjPortfolioBaseGUI.php.

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

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

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

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

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

◆ copyPageForm()

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

Select target portfolio for page(s) copy.

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

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

Referenced by copyPage().

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

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

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

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

547  : void
548  {
549  if (!$this->checkPermissionBool("write")) {
550  return;
551  }
552 
553  $page_ids = $this->port_request->getPortfolioPageIds();
554  foreach ($page_ids as $id) {
555  $page = $this->getPageInstance($id);
556  $page->delete();
557  }
558  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_portfolio_page_deleted"), true);
559  $this->ctrl->redirect($this, "view");
560  }
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 122 of file class.ilObjPortfolioBaseGUI.php.

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

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

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

References ILIAS\Repository\object().

Referenced by exportWithComments().

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

◆ exportWithComments()

ilObjPortfolioBaseGUI::exportWithComments ( )

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

References export().

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

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

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

References $additional.

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

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

◆ getCommentGUI()

ilObjPortfolioBaseGUI::getCommentGUI ( )
protected

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

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

Referenced by deletePortfolioPages().

740  : ilCommentGUI
741  {
742  $gui = $this->notes->gui()->getCommentsGUI(
743  $this->object->getId(),
744  $this->getCurrentPage(),
745  "pfpg"
746  );
747  $gui->setRepositoryMode(false);
748  $gui->enablePublicNotesDeletion(($this->user_id === $this->object->getOwner()) &&
749  $this->settings->get("comments_del_tutor", '1'));
750  return $gui;
751  }
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 712 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by deletePortfolioPages(), and getCommentGUI().

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

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

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

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

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

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

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

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

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

Referenced by copyPage(), and copyPageForm().

922  {
923  $form = new ilPropertyFormGUI();
924  $form->setFormAction($this->ctrl->getFormAction($this));
925  $form->setTitle($this->lng->txt("prtf_copy_page"));
926 
927  $this->initCopyPageFormOptions($form);
928 
929  $form->addCommandButton("copyPage", $this->lng->txt("save"));
930  $form->addCommandButton("view", $this->lng->txt("cancel"));
931 
932  return $form;
933  }
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 231 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilObjPortfolioGUI\initEditForm().

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

◆ initPageForm()

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

Init portfolio page form.

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

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

◆ renderFullscreenHeader()

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

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

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

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

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

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

451  : void
452  {
453  $form = $this->initPageForm("create");
454  if ($form->checkInput() && $this->checkPermissionBool("write")) {
455  $page = $this->getPageInstance();
456  $page->setType(ilPortfolioPage::TYPE_PAGE);
457  $page->setTitle($form->getInput("title"));
458 
459  // use template as basis
460  $layout_id = $form->getInput("tmpl");
461  if ($layout_id) {
462  $layout_obj = new ilPageLayout($layout_id);
463  $page->setXMLContent($layout_obj->copyXmlContent(false));
464  }
465 
466  $page->create();
467 
468  $this->tpl->setOnScreenMessage('success', $this->lng->txt("prtf_page_created"), true);
469  $this->ctrl->redirect($this, "view");
470  }
471 
472  $this->tabs_gui->clearTargets();
473  $this->tabs_gui->setBackTarget(
474  $this->lng->txt("back"),
475  $this->ctrl->getLinkTarget($this, "view")
476  );
477 
478  $form->setValuesByPost();
479  $this->tpl->setContent($form->getHTML());
480  }
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 485 of file class.ilObjPortfolioBaseGUI.php.

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

485  : void
486  {
487  if (!$this->checkPermissionBool("write")) {
488  return;
489  }
490 
491  $title_changes = array();
492 
493  $order = $this->port_request->getOrder();
494  $titles = $this->port_request->getTitles();
495  if (count($order) > 0) {
496  foreach ($order as $k => $v) {
497  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
498  if ($titles[$k] ?? "") {
499  $new_title = $titles[$k] ?? "";
500  if ($page->getTitle() != $new_title) {
501  $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
502  $page->setTitle($new_title);
503  }
504  }
505  $page->setOrderNr(ilUtil::stripSlashes($v));
506  $page->update();
507  }
508  ilPortfolioPage::fixOrdering($this->object->getId());
509  }
510 
511  $this->object->fixLinksOnTitleChange($title_changes);
512 
513  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
514  $this->ctrl->redirect($this, "view");
515  }
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 185 of file class.ilObjPortfolioBaseGUI.php.

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

◆ setContentStyleSheet()

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

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

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

Referenced by deletePortfolioPages(), and handlePageCall().

942  : void {
943  $tpl = $this->tpl;
944 
945  if ($a_tpl) {
946  $ctpl = $a_tpl;
947  } else {
948  $ctpl = $tpl;
949  }
950 
951  $this->content_style_gui->addCss(
952  $ctpl,
953  $this->object->getRefId(),
954  $this->object->getId()
955  );
956  }
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 198 of file class.ilObjPortfolioBaseGUI.php.

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

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs ( string  $a_active)
protected

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

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

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

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

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

Referenced by deletePortfolioPages().

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

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

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

269  : void
270  {
271  $this->object->setPublicComments($form->getInput("comments"));
272  $this->object->setProfilePicture($form->getInput("ppic"));
273  $prfa_set = new ilSetting("prfa");
274  }
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 293 of file class.ilObjPortfolioBaseGUI.php.

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

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

Field Documentation

◆ $additional

array ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjPortfolioBaseGUI::$content_style_domain
protected

Definition at line 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 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: