ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjPortfolioBaseGUI Class Reference

Portfolio view gui base class. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 setAdditional ($a_additional)
 Set Additonal Information (used in public profile?) More...
 
 getAdditional ()
 Get Additonal Information. More...
 
 setPermaLink ($a_obj_id, $a_type)
 Set custom perma link (used in public profile?) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 getPageGUIClassName ()
 
 view ()
 Show list of portfolio pages. More...
 
 initPageForm ($a_mode="create")
 Init portfolio page form. More...
 
 savePage ()
 Create new portfolio page. More...
 
 savePortfolioPagesOrdering ()
 Save ordering of portfolio pages. More...
 
 confirmPortfolioPageDeletion ()
 Confirm portfolio deletion. More...
 
 deletePortfolioPages ()
 Delete portfolio pages. More...
 
 preview ($a_return=false, $a_content=false, $a_show_notes=true)
 Show user page. More...
 
 export ($a_with_comments=false)
 
 exportWithComments ()
 
 copyPageForm ($a_form=null)
 Select target portfolio for page(s) copy. More...
 
 copyPage ()
 
 initCopyPageForm ()
 
 setContentStyleSheet ($a_tpl=null)
 
 editStyleProperties ()
 
 initStylePropertiesForm ()
 
 createStyle ()
 
 editStyle ()
 
 deleteStyle ()
 
 saveStyleSettings ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 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 ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static renderFullscreenHeader ($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
 Render banner, user name. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 addLocatorItems ()
 Functions to be overwritten. More...
 
 determinePageCall ()
 
 handlePageCall ($a_cmd)
 
 setSettingsSubTabs ($a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 getPageInstance ($a_page_id=null, $a_portfolio_id=null)
 
 getPageGUIInstance ($a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 addBlog ()
 Show portfolio blog page creation form. More...
 
 initBlogForm ()
 
 saveBlog ()
 
 showEditButton ($page_id)
 Show edit button. More...
 
 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 ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $help
 
 $main_menu
 
 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
 $requested_ppage
 
 $requested_user_page
 
 $requested_back_url = ""
 
 $ui
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
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 10 of file class.ilObjPortfolioBaseGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Reimplemented from ilObject2GUI.

Reimplemented in ilObjPortfolioTemplateGUI.

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

49 {
50 global $DIC;
51
52 $this->user = $DIC->user();
53 $this->locator = $DIC["ilLocator"];
54 $this->toolbar = $DIC->toolbar();
55 $this->settings = $DIC->settings();
56 $this->tree = $DIC->repositoryTree();
57 $this->help = $DIC["ilHelp"];
58 $this->main_menu = $DIC["ilMainMenu"];
59 $this->tpl = $DIC["tpl"];
60 $ilUser = $DIC->user();
61 $this->ui = $DIC->ui();
62
63 $this->ui = $DIC->ui();
64
65 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
66
67 $this->user_id = $ilUser->getId();
68
69 $this->lng->loadLanguageModule("prtf");
70 $this->lng->loadLanguageModule("user");
71 $this->lng->loadLanguageModule("obj");
72
73 $this->requested_ppage = (int) $_REQUEST["ppage"];
74 $this->requested_user_page = (int) $_REQUEST["user_page"];
75
76 // temp sanitization, should be done smarter in the future
77 $back = str_replace("&", ":::", $_REQUEST["back_url"]);
78 $back = preg_replace(
79 "/[^a-zA-Z0-9_\.\?=:\s]/",
80 "",
81 $back
82 );
83 $this->requested_back_url = str_replace(":::", "&", $back);
84
85 $this->ctrl->setParameterbyClass("ilobjportfoliogui", "back_url", rawurlencode($this->requested_back_url));
86 }
user()
Definition: user.php:4
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
$ilUser
Definition: imgupload.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5

References $DIC, $ilUser, ILIAS\GlobalScreen\Provider\__construct(), help(), settings(), ui(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

495 {
496 $ilHelp = $this->help;
497
498 $this->tabs_gui->clearTargets();
499 $this->tabs_gui->setBackTarget(
500 $this->lng->txt("back"),
501 $this->ctrl->getLinkTarget($this, "view")
502 );
503
504 $ilHelp->setScreenIdComponent("prtf");
505 $ilHelp->setScreenId("add_blog");
506
507 $form = $this->initBlogForm();
508 $this->tpl->setContent($form->getHTML());
509 }

References $help, and initBlogForm().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

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

89 {
90 $ilLocator = $this->locator;
91
92 if ($this->object) {
93 $ilLocator->addItem(
94 strip_tags($this->object->getTitle()),
95 $this->ctrl->getLinkTarget($this, "view")
96 );
97 }
98
99 if ($this->page_id) {
100 $page = $this->getPageInstance($this->page_id);
101 $title = $page->getTitle();
102 if ($page->getType() == ilPortfolioPage::TYPE_BLOG) {
103 $title = ilObject::_lookupTitle($title);
104 }
105 $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
106 $ilLocator->addItem(
107 $title,
108 $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
109 );
110 }
111 }
getPageInstance($a_page_id=null, $a_portfolio_id=null)
static _lookupTitle($a_id)
lookup object title

References ilObjectGUI\$locator, ilObject\_lookupTitle(), getPageGUIClassName(), getPageInstance(), and ilPortfolioPage\TYPE_BLOG.

+ Here is the call graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

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 }
initPageForm($a_mode="create")
Init portfolio page form.

References $help, and initPageForm().

+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( )

Confirm portfolio deletion.

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

552 {
553 $prtf_pages = $_REQUEST["prtf_pages"];
554
555 if (!is_array($prtf_pages) || count($prtf_pages) == 0) {
556 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
557 $this->ctrl->redirect($this, "view");
558 } else {
559 $this->tabs_gui->activateTab("pages");
560
561 $cgui = new ilConfirmationGUI();
562 $cgui->setFormAction($this->ctrl->getFormAction($this));
563 $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
564 $cgui->setCancel($this->lng->txt("cancel"), "view");
565 $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
566
567 foreach ($prtf_pages as $id) {
568 $id = (int) $id;
569 $page = $this->getPageInstance((int) $id);
570 if ($page->getPortfolioId() != $this->object->getId()) {
571 continue;
572 }
573
574 $title = $page->getTitle();
575 if ($page->getType() == ilPortfolioPage::TYPE_BLOG) {
576 $title = $this->lng->txt("obj_blog") . ": " . ilObject::_lookupTitle((int) $title);
577 }
578 $cgui->addItem("prtf_pages[]", $id, $title);
579 }
580
581 $this->tpl->setContent($cgui->getHTML());
582 }
583 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References ilObject\_lookupTitle(), getPageInstance(), ilUtil\sendInfo(), and ilPortfolioPage\TYPE_BLOG.

+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

952 {
953 $form = $this->initCopyPageForm();
954 if ($form->checkInput()) {
955 // existing
956 if ($form->getInput("target") == "old") {
957 $portfolio_id = $form->getInput("prtf");
958 }
959 // new
960 else {
961 $portfolio = new ilObjPortfolio();
962 $portfolio->setTitle($form->getInput("title"));
963 $portfolio->create();
964 $portfolio_id = $portfolio->getId();
965 }
966
967 // copy page(s)
968 foreach ($_POST["prtf_pages"] as $page_id) {
969 $page_id = (int) $page_id;
970 $source = $this->getPageInstance($page_id);
971 $target = $this->getPageInstance(null, $portfolio_id);
972 $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
973 $target->setType($source->getType());
974 $target->setTitle($source->getTitle());
975 $target->create();
976 }
977
978 ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
979 $this->ctrl->redirect($this, "view");
980 }
981
982 $form->setValuesByPost();
983 $this->copyPageForm($form);
984 }
$_POST["username"]
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
$source
Definition: metadata.php:76

References $_POST, $page_id, $source, copyPageForm(), getPageInstance(), and initCopyPageForm().

+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm (   $a_form = null)

Select target portfolio for page(s) copy.

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

928 {
929 $prtf_pages = $_REQUEST["prtf_pages"];
930
931 if (!is_array($prtf_pages) || count($prtf_pages) == 0) {
932 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
933 $this->ctrl->redirect($this, "view");
934 } else {
935 $this->tabs_gui->activateTab("pages");
936
937 if (!$a_form) {
938 $a_form = $this->initCopyPageForm();
939 }
940
941 foreach ($prtf_pages as $page_id) {
942 $item = new ilHiddenInputGUI("prtf_pages[]");
943 $item->setValue((int) $page_id);
944 $a_form->addItem($item);
945 }
946
947 $this->tpl->setContent($a_form->getHTML());
948 }
949 }
This class represents a hidden form property in a property form.

References $page_id, initCopyPageForm(), and ilUtil\sendInfo().

Referenced by copyPage().

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

◆ createStyle()

ilObjPortfolioBaseGUI::createStyle ( )

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

1096 {
1097 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1098 }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

589 {
590 if (!$this->checkPermissionBool("write")) {
591 return;
592 }
593
594 if (is_array($_POST["prtf_pages"])) {
595 foreach ($_POST["prtf_pages"] as $id) {
596 $id = (int) $id;
597 $page = $this->getPageInstance($id);
598 $page->delete();
599 }
600 }
601 ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
602 $this->ctrl->redirect($this, "view");
603 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.

References $_POST, ilObject2GUI\checkPermissionBool(), and getPageInstance().

+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

1106 {
1107 $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
1108 }

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

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

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

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

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

◆ editStyle()

ilObjPortfolioBaseGUI::editStyle ( )

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

1101 {
1102 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1103 }

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

1026 {
1027 $this->checkPermission("write");
1028
1029 $this->tabs_gui->activateTab("settings");
1030 $this->setSettingsSubTabs("style");
1031
1032 $form = $this->initStylePropertiesForm();
1033 $this->tpl->setContent($form->getHTML());
1034 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObject2GUI\checkPermission(), initStylePropertiesForm(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export (   $a_with_comments = false)

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

911 {
912 $port_export = new \ILIAS\Portfolio\Export\PortfolioHtmlExport($this);
913 $port_export->includeComments($a_with_comments);
914 $zip = $port_export->exportHtml();
915
916 ilUtil::deliverFile($zip, $this->object->getTitle() . ".zip", '', false, true);
917 }
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.

References ilUtil\deliverFile().

Referenced by exportWithComments().

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

◆ exportWithComments()

ilObjPortfolioBaseGUI::exportWithComments ( )

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

920 {
921 $this->export(true);
922 }
export($a_with_comments=false)

References export().

+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

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

References $additional.

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

+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Parameters
array$a_values

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

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

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

◆ getPageGUIClassName()

ilObjPortfolioBaseGUI::getPageGUIClassName ( )
abstract

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by ilPortfolioPageTableGUI\__construct(), and addLocatorItems().

+ Here is the caller graph for this function:

◆ getPageGUIInstance()

ilObjPortfolioBaseGUI::getPageGUIInstance (   $a_page_id)
abstractprotected

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by handlePageCall(), and preview().

+ Here is the caller graph for this function:

◆ getPageInstance()

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

◆ handlePageCall()

ilObjPortfolioBaseGUI::handlePageCall (   $a_cmd)
protected

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

136 {
137 if (!$this->page_id) {
138 $this->ctrl->redirect($this, "view");
139 }
140
141 $page_gui = $this->getPageGUIInstance($this->page_id);
142
143 $this->tabs_gui->clearTargets();
144 $this->tabs_gui->setBackTarget(
145 $this->lng->txt("back"),
146 $this->ctrl->getLinkTarget($this, "view")
147 );
148
149 // needed for editor
151 $this->object->getStyleSheetId(),
152 $this->getType()
153 ));
154
155 $ret = $this->ctrl->forwardCommand($page_gui);
156
157 if ($ret != "" && $ret !== true) {
158 // preview (fullscreen)
159 if ($this->page_mode == "preview") {
160 // embedded call which did not generate any output (e.g. calendar month navigation)
162 // suppress (portfolio) notes for blog postings
163 $this->preview(false, $ret, ($a_cmd != "previewEmbedded"));
164 } else {
165 $this->preview(false);
166 }
167 }
168 // edit
169 else {
170 $this->setContentStyleSheet();
171 if (is_string($ret)) {
172 $this->tpl->setContent($ret);
173 }
174 }
175 }
176 }
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
getPageGUIInstance($a_page_id)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
$ret
Definition: parser.php:6

References $ret, ilPortfolioPageGUI\EMBEDDED_NO_OUTPUT, ilObjStyleSheet\getEffectiveContentStyleId(), getPageGUIInstance(), preview(), and setContentStyleSheet().

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

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

◆ initBlogForm()

ilObjPortfolioBaseGUI::initBlogForm ( )
abstractprotected

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

989 {
990 $form = new ilPropertyFormGUI();
991 $form->setFormAction($this->ctrl->getFormAction($this));
992 $form->setTitle($this->lng->txt("prtf_copy_page"));
993
994 $this->initCopyPageFormOptions($form);
995
996 $form->addCommandButton("copyPage", $this->lng->txt("save"));
997 $form->addCommandButton("view", $this->lng->txt("cancel"));
998
999 return $form;
1000 }
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
This class represents a property form user interface.

References initCopyPageFormOptions().

Referenced by copyPage(), and copyPageForm().

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

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
abstractprotected

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

Referenced by initCopyPageForm().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioTemplateGUI.

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

236 {
237 $this->setSettingsSubTabs("properties");
238
239
240 // profile picture
241 $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
242 $a_form->addItem($ppic);
243
244 $prfa_set = new ilSetting("prfa");
245 if ($prfa_set->get("banner")) {
246 $dimensions = " (" . $prfa_set->get("banner_width") . "x" .
247 $prfa_set->get("banner_height") . ")";
248
249 $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner") . $dimensions, "banner");
250 $a_form->addItem($img);
251
252 // show existing file
253 $file = $this->object->getImageFullPath(true);
254 if ($file) {
255 $img->setImage($file);
256 }
257 }
258
260 $section->setTitle($this->lng->txt('obj_features'));
261 $a_form->addItem($section);
262
263 // comments
264 $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
265 $a_form->addItem($comments);
266
267 /* #15000
268 $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
269 $a_form->addItem($bg_color);
270
271 $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
272 $a_form->addItem($font_color);
273 */
274 }
$section
Definition: Utf8Test.php:83
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
This class represents an image file property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
ILIAS Setting Class.
$img
Definition: imgupload.php:57

References $img, $section, ilPropertyFormGUI\addItem(), and setSettingsSubTabs().

Referenced by ilObjPortfolioGUI\initEditForm().

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

◆ initPageForm()

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

Init portfolio page form.

Parameters
string$a_mode
Returns
ilPropertyFormGUI

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

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

References ilPageLayout\activeLayouts(), and ilPageLayout\MODULE_PORTFOLIO.

Referenced by addPage(), and savePage().

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

◆ initStylePropertiesForm()

ilObjPortfolioBaseGUI::initStylePropertiesForm ( )

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

1037 {
1039
1040 $this->lng->loadLanguageModule("style");
1041
1042 $form = new ilPropertyFormGUI();
1043
1044 $fixed_style = $ilSetting->get("fixed_content_style_id");
1045 $style_id = $this->object->getStyleSheetId();
1046
1047 if ($fixed_style > 0) {
1048 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1049 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1050 $this->lng->txt("global_fixed") . ")");
1051 $form->addItem($st);
1052 } else {
1054 true,
1055 false,
1056 $_GET["ref_id"]
1057 );
1058
1059 $st_styles[0] = $this->lng->txt("default");
1060 ksort($st_styles);
1061
1062 if ($style_id > 0) {
1063 // individual style
1064 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1065 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1066 $st->setValue(ilObject::_lookupTitle($style_id));
1067 $form->addItem($st);
1068
1069 // delete command
1070 $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
1071 $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
1072 }
1073 }
1074
1075 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1076 $style_sel = new ilSelectInputGUI(
1077 $this->lng->txt("style_current_style"),
1078 "style_id"
1079 );
1080 $style_sel->setOptions($st_styles);
1081 $style_sel->setValue($style_id);
1082 $form->addItem($style_sel);
1083
1084 $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
1085 $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
1086 }
1087 }
1088
1089 $form->setTitle($this->lng->txt($this->getType() . "_style"));
1090 $form->setFormAction($this->ctrl->getFormAction($this));
1091
1092 return $form;
1093 }
$_GET["client_id"]
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
This class represents a selection list property in a property form.
global $ilSetting
Definition: privfeed.php:17

References $_GET, $ilSetting, ilObjectGUI\$settings, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), and ilObject\_lookupTitle().

Referenced by editStyleProperties().

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

◆ preview()

ilObjPortfolioBaseGUI::preview (   $a_return = false,
  $a_content = false,
  $a_show_notes = true 
)

Show user page.

Reimplemented in ilObjPortfolioTemplateGUI.

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

609 {
612
613 $portfolio_id = $this->object->getId();
614 $user_id = $this->object->getOwner();
615
616 $this->tabs_gui->clearTargets();
617
618 $pages = ilPortfolioPage::getAllPortfolioPages($portfolio_id);
619 $current_page = $this->requested_user_page;
620
621 // validate current page
622 if ($pages && $current_page) {
623 $found = false;
624 foreach ($pages as $page) {
625 if ($page["id"] == $current_page) {
626 $found = true;
627 break;
628 }
629 }
630 if (!$found) {
631 $current_page = null;
632 }
633 }
634
635 // display first page of portfolio if none given
636 if (!$current_page && $pages) {
637 $current_page = $pages;
638 $current_page = array_shift($current_page);
639 $current_page = $current_page["id"];
640 }
641
642 // #13788 - keep page after login
643 if ($this->user_id == ANONYMOUS_USER_ID &&
644 $this->getType() == "prtf") {
645 $this->tpl->setLoginTargetPar("prtf_" . $this->object->getId() . "_" . $current_page);
646 }
647
648 $back_caption = "";
649
650 // public profile
651 if ($this->requested_back_url != "") {
653 } elseif ($_GET["baseClass"] != "ilPublicUserProfileGUI" &&
654 $this->user_id && $this->user_id != ANONYMOUS_USER_ID) {
655 if (!$this->checkPermissionBool("write")) {
656 // shared
657 if ($this->getType() == "prtf") {
658 $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", $this->object->getOwner());
659 $back = $this->ctrl->getLinkTargetByClass(array("ildashboardgui", "ilportfoliorepositorygui"), "showOther");
660 $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", "");
661 }
662 // listgui / parent container
663 else {
664 // #12819
666 $parent_id = $tree->getParentId($this->node_id);
668 }
669 }
670 // owner
671 else {
672 $back = $this->ctrl->getLinkTarget($this, "view");
673 if ($this->getType() == "prtf") {
674 $back_caption = $this->lng->txt("prtf_back_to_portfolio_owner");
675 } else {
676 // #19316
677 $this->lng->loadLanguageModule("prtt");
678 $back_caption = $this->lng->txt("prtt_edit");
679 }
680 }
681 }
682
683 $ilMainMenu = $this->main_menu;
684 $ilMainMenu->setMode(ilMainMenuGUI::MODE_TOPBAR_ONLY);
685 if ($back) {
686 // might already be set in ilPublicUserProfileGUI
687 $ilMainMenu->setTopBarBack($back, $back_caption);
688 }
689
690 // render tabs
691 $current_blog = null;
692 if (count($pages) > 1) {
693 foreach ($pages as $p) {
694 if ($p["type"] == ilPortfolioPage::TYPE_BLOG) {
695 // needed for blog comments (see below)
696 if ($p["id"] == $current_page) {
697 $current_blog = (int) $p["title"];
698 }
699 $p["title"] = ilObjBlog::_lookupTitle($p["title"]);
700 }
701
702 $this->ctrl->setParameter($this, "user_page", $p["id"]);
703 $this->tabs_gui->addTab(
704 "user_page_" . $p["id"],
705 $p["title"],
706 $this->ctrl->getLinkTarget($this, "preview")
707 );
708 }
709
710 $this->tabs_gui->activateTab("user_page_" . $current_page);
711 }
712
713 $this->ctrl->setParameter($this, "user_page", $current_page);
714
715 if (!$a_content) {
716 // #18291
717 if ($current_page) {
718 // get current page content
719 $page_gui = $this->getPageGUIInstance($current_page);
720 $page_gui->setEmbedded(true);
721
722 $content = $this->ctrl->getHTML($page_gui);
723 }
724 } else {
725 $content = $a_content;
726 }
727
728 if ($a_return && $this->checkPermissionBool("write")) {
729 return $content;
730 }
731
732 // blog posting comments are handled within the blog
733 $notes = "";
734 if ($a_show_notes && $this->object->hasPublicComments() && !$current_blog && $current_page) {
735 $note_gui = new ilNoteGUI($portfolio_id, $current_page, "pfpg");
736
737 $note_gui->setRepositoryMode(false);
738 $note_gui->enablePublicNotes(true);
739 $note_gui->enablePrivateNotes(false);
740
741 $note_gui->enablePublicNotesDeletion(($this->user_id == $user_id) &&
742 $ilSetting->get("comments_del_tutor", 1));
743
744 $next_class = $this->ctrl->getNextClass($this);
745 if ($next_class == "ilnotegui") {
746 $notes = $this->ctrl->forwardCommand($note_gui);
747 } else {
748 $notes = $note_gui->getNotesHTML();
749 }
750 }
751
752 if ($this->perma_link === null) {
753 if ($this->getType() == "prtf") {
754 $this->tpl->setPermanentLink($this->getType(), $this->object->getId(), "_" . $current_page);
755 } else {
756 $this->tpl->setPermanentLink($this->getType(), $this->object->getRefId());
757 }
758 } else {
759 $this->tpl->setPermanentLink($this->perma_link["type"], $this->perma_link["obj_id"]);
760 }
761
762 // #18208 - see ilPortfolioTemplatePageGUI::getPageContentUserId()
763 if ($this->getType() == "prtt" && !$this->checkPermissionBool("write")) {
764 $user_id = $ilUser->getId();
765 }
766
767 self::renderFullscreenHeader($this->object, $this->tpl, $user_id);
768
769 // #13564
770 $this->ctrl->setParameter($this, "user_page", "");
771 //$this->tpl->setTitleUrl($this->ctrl->getLinkTarget($this, "preview"));
772 $this->ctrl->setParameter($this, "user_page", $this->page_id);
773
774 // blog pages do their own (page) style handling
775 if (!$current_blog) {
776 $content = '<div id="ilCOPageContent" class="ilc_page_cont_PageContainer">' .
777 '<div class="ilc_page_Page">' .
778 $content .
779 '</div></div>';
780
781 $this->setContentStyleSheet($this->tpl);
782 }
783
784 $this->showEditButton($current_page);
785
786 // #10717
787 $this->tpl->setContent($content .
788 '<div class="ilClearFloat">' . $notes . '</div>');
789 }
Notes GUI class.
showEditButton($page_id)
Show edit button.
static renderFullscreenHeader($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
Render banner, user name.
getType()
Functions that must be overwritten.
static _lookupTitle($a_id)
lookup object title
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
const ANONYMOUS_USER_ID
Definition: constants.php:25

References $_GET, $ilSetting, $ilUser, $main_menu, ilObject2GUI\$parent_id, $requested_back_url, $requested_user_page, ilObjectGUI\$settings, ilObjectGUI\$tree, ilObjectGUI\$user, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), ANONYMOUS_USER_ID, ilObject2GUI\checkPermissionBool(), ilPortfolioPage\getAllPortfolioPages(), getPageGUIInstance(), ilObject2GUI\getType(), ilMainMenuGUI\MODE_TOPBAR_ONLY, renderFullscreenHeader(), setContentStyleSheet(), showEditButton(), and ilPortfolioPage\TYPE_BLOG.

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

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

◆ renderFullscreenHeader()

static ilObjPortfolioBaseGUI::renderFullscreenHeader (   $a_portfolio,
  $a_tpl,
  $a_user_id,
  $a_export = false 
)
static

Render banner, user name.

Parameters
object$a_tpl
int$a_user_id
bool$a_export_path

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

854 {
855 global $DIC;
856
857 $ilUser = $DIC->user();
858
859 if (!$a_export) {
861 $a_portfolio->getType(),
862 ($a_portfolio->getType() == "prtt")
863 ? $a_portfolio->getRefId()
864 : $a_portfolio->getId(),
865 $a_portfolio->getId(),
866 $ilUser->getId()
867 );
868 }
869
870 $name = ilObjUser::_lookupName($a_user_id);
871 $name = $name["lastname"] . ", " . ($t = $name["title"] ? $t . " " : "") . $name["firstname"];
872
873 // show banner?
874 $banner = $banner_width = $banner_height = false;
875 $prfa_set = new ilSetting("prfa");
876 if ($prfa_set->get("banner")) {
877 $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
878 $banner_width = $prfa_set->get("banner_width");
879 $banner_height = $prfa_set->get("banner_height");
880 if ($a_export) {
881 $banner = basename($banner);
882 }
883 }
884
885 // profile picture
886 $ppic = null;
887 if ($a_portfolio->hasProfilePicture()) {
888 $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
889 if ($a_export) {
890 $ppic = basename($ppic);
891 }
892 }
893
894 $a_tpl->resetHeaderBlock(false);
895 // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
896 // @todo fix this
897 $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
898 $a_tpl->setTitleIcon($ppic);
899 $a_tpl->setTitle($a_portfolio->getTitle());
900 // $a_tpl->setTitleColor($a_portfolio->getFontColor());
901 $a_tpl->setDescription($name);
902
903 // to get rid of locator in portfolio template preview
904 $a_tpl->setVariable("LOCATOR", "");
905
906 // :TODO: obsolete?
907 // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
908 }
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _getPersonalPicturePath( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false, $html_export=false)
Get path to personal picture.
static _lookupName($a_user_id)
lookup user name
static signFile($path_to_file)
if($format !==null) $name
Definition: metadata.php:230

References $DIC, $ilUser, $name, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupName(), ilChangeEvent\_recordReadEvent(), and ilWACSignedPath\signFile().

Referenced by preview().

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

◆ saveBlog()

ilObjPortfolioBaseGUI::saveBlog ( )
abstractprotected

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

461 {
462 $form = $this->initPageForm("create");
463 if ($form->checkInput() && $this->checkPermissionBool("write")) {
464 $page = $this->getPageInstance();
465 $page->setType(ilPortfolioPage::TYPE_PAGE);
466 $page->setTitle($form->getInput("title"));
467
468 // use template as basis
469 $layout_id = $form->getInput("tmpl");
470 if ($layout_id) {
471 $layout_obj = new ilPageLayout($layout_id);
472 $page->setXMLContent($layout_obj->getXMLContent());
473 }
474
475 $page->create();
476
477 ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
478 $this->ctrl->redirect($this, "view");
479 }
480
481 $this->tabs_gui->clearTargets();
482 $this->tabs_gui->setBackTarget(
483 $this->lng->txt("back"),
484 $this->ctrl->getLinkTarget($this, "view")
485 );
486
487 $form->setValuesByPost();
488 $this->tpl->setContent($form->getHtml());
489 }
Class ilPageLayout.

References getPageInstance(), initPageForm(), and ilPortfolioPage\TYPE_PAGE.

+ Here is the call graph for this function:

◆ savePortfolioPagesOrdering()

ilObjPortfolioBaseGUI::savePortfolioPagesOrdering ( )

Save ordering of portfolio pages.

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

519 {
520 if (!$this->checkPermissionBool("write")) {
521 return;
522 }
523
524 $title_changes = array();
525
526 if (is_array($_POST["order"])) {
527 foreach ($_POST["order"] as $k => $v) {
528 $page = $this->getPageInstance(ilUtil::stripSlashes($k));
529 if ($_POST["title"][$k]) {
530 $new_title = trim(ilUtil::stripSlashes($_POST["title"][$k]));
531 if ($page->getTitle() != $new_title) {
532 $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
533 $page->setTitle($new_title);
534 }
535 }
536 $page->setOrderNr(ilUtil::stripSlashes($v));
537 $page->update();
538 }
539 ilPortfolioPage::fixOrdering($this->object->getId());
540 }
541
542 $this->object->fixLinksOnTitleChange($title_changes);
543
544 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
545 $this->ctrl->redirect($this, "view");
546 }
static fixOrdering($a_portfolio_id)
Fix ordering.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilObject2GUI\checkPermissionBool(), ilPortfolioPage\fixOrdering(), getPageInstance(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjPortfolioBaseGUI::saveStyleSettings ( )

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

1111 {
1113
1114 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1115 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1116 || $this->object->getStyleSheetId() == 0)) {
1117 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1118 $this->object->update();
1119
1120 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1121 }
1122 $this->ctrl->redirect($this, "editStyleProperties");
1123 }

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjStyleSheet\_lookupStandard(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setAdditional()

ilObjPortfolioBaseGUI::setAdditional (   $a_additional)

Set Additonal Information (used in public profile?)

Parameters
array$a_additionalAdditonal Information

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

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

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet (   $a_tpl = null)

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

1008 {
1009 $tpl = $this->tpl;
1010
1011 if ($a_tpl != null) {
1012 $ctpl = $a_tpl;
1013 } else {
1014 $ctpl = $tpl;
1015 }
1016
1017 $ctpl->setCurrentBlock("ContentStyle");
1018 $ctpl->setVariable(
1019 "LOCATION_CONTENT_STYLESHEET",
1020 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
1021 );
1022 $ctpl->parseCurrentBlock();
1023 }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path

References ilObjectGUI\$tpl, and ilObjStyleSheet\getContentStylePath().

Referenced by handlePageCall(), and preview().

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

◆ setPermaLink()

ilObjPortfolioBaseGUI::setPermaLink (   $a_obj_id,
  $a_type 
)

Set custom perma link (used in public profile?)

Parameters
int$a_obj_id
string$a_type

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

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

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

215 {
216 // #17455
217 $this->lng->loadLanguageModule($this->getType());
218
219 // general properties
220 $this->tabs_gui->addSubTab(
221 "properties",
222 $this->lng->txt($this->getType() . "_properties"),
223 $this->ctrl->getLinkTarget($this, 'edit')
224 );
225
226 $this->tabs_gui->addSubTab(
227 "style",
228 $this->lng->txt("obj_sty"),
229 $this->ctrl->getLinkTarget($this, 'editStyleProperties')
230 );
231
232 $this->tabs_gui->activateSubTab($a_active);
233 }

References ilObject2GUI\getType().

Referenced by editStyleProperties(), and initEditCustomForm().

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

◆ showEditButton()

ilObjPortfolioBaseGUI::showEditButton (   $page_id)
protected

Show edit button.

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

796 {
797 $page_class = ($this->getType() == "prtt")
798 ? "ilPortfolioTemplatePageGUI"
799 : "ilportfoliopagegui";
800 $button = null;
801 if ($this->checkPermissionBool("write") &&
803 if ($this->getType() === "prtt") {
804 $button = $this->ui->factory()->button()->standard(
805 $this->lng->txt("prtt_edit"),
806 $this->ctrl->getLinkTargetByClass(["ilobjportfoliotemplategui"], "view")
807 );
808 } else {
809 $button = $this->ui->factory()->button()->standard(
810 $this->lng->txt("prtf_edit_portfolio"),
811 $this->ctrl->getLinkTargetByClass(["ilobjportfoliogui"], "view")
812 );
813 }
814 $this->toolbar->addComponent($button);
815 $button = null;
816 }
818 $this->ctrl->setParameterByClass($page_class, "ppage", $page_id);
819 $button = $this->ui->factory()->button()->standard(
820 $this->lng->txt("edit_page"),
821 $this->ctrl->getLinkTargetByClass($page_class, "edit")
822 );
823 if ($this->checkPermissionBool("write")) {
824 $this->toolbar->addComponent($button);
825 }
826 $button = null;
827 } else {
828 if ($this->getType() != "prtt") {
829 if ($page_id > 0) {
830 /*
831 $this->ctrl->setParameterByClass("ilobjbloggui", "ppage", $page_id);
832 $this->ctrl->setParameterByClass("ilobjbloggui", "prt_id", (int) $_GET["prt_id"]);
833 $button = $this->ui->factory()->button()->standard(
834 $this->lng->txt("edit"),
835 $this->ctrl->getLinkTargetByClass([$page_class, "ilobjbloggui"], "render")
836 );*/
837 }
838 } else { // portfolio template, blog page cannot be edited -> link to overview
839 }
840 }
841 if ($button && $this->checkPermissionBool("write")) {
842 $this->tpl->setHeaderActionMenu($this->ui->renderer()->render($button));
843 }
844 }
static lookupType($a_page_id)
Lookup type.

References $page_id, ilObject2GUI\checkPermissionBool(), ilObject2GUI\getType(), ilPortfolioPage\lookupType(), ilPortfolioPage\TYPE_PAGE, and ui().

Referenced by preview().

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

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $a_form)

Insert custom update form values into object.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjectGUI.

Reimplemented in ilObjPortfolioGUI, and ilObjPortfolioTemplateGUI.

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

287 {
288 $this->object->setPublicComments($a_form->getInput("comments"));
289 $this->object->setProfilePicture($a_form->getInput("ppic"));
290 /*
291 $this->object->setBackgroundColor($a_form->getInput("bg_color"));
292 $this->object->setFontcolor($a_form->getInput("font_color"));
293 */
294
295 $prfa_set = new ilSetting("prfa");
296
297 if ($_FILES["banner"]["tmp_name"]) {
298 $this->object->uploadImage($_FILES["banner"]);
299 } elseif ($prfa_set->get('banner') and $a_form->getItemByPostVar("banner")->getDeletionFlag()) {
300 $this->object->deleteImage();
301 }
302 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
getItemByPostVar($a_post_var)
Get Item by POST variable.

References ilPropertyFormGUI\getInput(), and ilPropertyFormGUI\getItemByPostVar().

+ Here is the call graph for this function:

◆ view()

ilObjPortfolioBaseGUI::view ( )

Show list of portfolio pages.

Reimplemented from ilObject2GUI.

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

319 {
321 $ilToolbar = $this->toolbar;
324
325 if (!$this->checkPermissionBool("write")) {
326 $this->ctrl->redirect($this, "infoScreen");
327 }
328
329 $this->tabs_gui->activateTab("pages");
330
331
332 $button = ilLinkButton::getInstance();
333 $button->setCaption("prtf_add_page");
334 $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
335 $ilToolbar->addStickyItem($button);
336
337 if (!$ilSetting->get('disable_wsp_blogs')) {
338 $button = ilLinkButton::getInstance();
339 $button->setCaption("prtf_add_blog");
340 $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
341 $ilToolbar->addStickyItem($button);
342 }
343
344
345 // #16571
346 $modal_html = "";
347 if ($this->getType() == "prtf") {
348 $ilToolbar->addSeparator();
349
350 $ui = $this->ui;
351
352 if ($this->object->isCommentsExportPossible()) {
353 $this->lng->loadLanguageModule("note");
354 $comment_export_helper = new \ILIAS\Notes\Export\ExportHelperGUI();
355 $comment_modal = $comment_export_helper->getCommentIncludeModalDialog(
356 $this->lng->txt("export_html"),
357 $this->lng->txt("note_html_export_include_comments"),
358 $this->ctrl->getLinkTarget($this, "export"),
359 $this->ctrl->getLinkTarget($this, "exportWithComments")
360 );
361 $button = $ui->factory()->button()->standard($this->lng->txt("export_html"), '')
362 ->withOnClick($comment_modal->getShowSignal());
363 $ilToolbar->addComponent($button);
364 $modal_html = $ui->renderer()->render($comment_modal);
365 } else {
366 $button = ilLinkButton::getInstance();
367 $button->setCaption("export_html");
368 $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
369 $ilToolbar->addButtonInstance($button);
370 }
371
372
373 $button = ilLinkButton::getInstance();
374 $button->setCaption("prtf_pdf");
375 $button->setUrl($this->ctrl->getLinkTarget($this, "exportPDFSelection"));
376 $ilToolbar->addButtonInstance($button);
377 }
378
379 $table = new ilPortfolioPageTableGUI($this, "view");
380
381
382 $this->tpl->setContent($message . $table->getHTML() . $modal_html);
383 }
static getInstance()
Factory.
$message
Definition: xapiexit.php:14

References ilObjectGUI\$ctrl, $ilSetting, $message, ilObjectGUI\$settings, ilObjectGUI\$toolbar, ilObjectGUI\$tree, $ui, ilObject2GUI\checkPermissionBool(), ilLinkButton\getInstance(), and ilObject2GUI\getType().

+ Here is the call graph for this function:

Field Documentation

◆ $additional

ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $help

ilObjPortfolioBaseGUI::$help
protected

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

Referenced by addBlog(), and addPage().

◆ $main_menu

ilObjPortfolioBaseGUI::$main_menu
protected

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

Referenced by preview().

◆ $page_id

ilObjPortfolioBaseGUI::$page_id
protected

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

Referenced by copyPage(), copyPageForm(), and showEditButton().

◆ $page_mode

ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

ilObjPortfolioBaseGUI::$perma_link
protected

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

◆ $requested_back_url

ilObjPortfolioBaseGUI::$requested_back_url = ""
protected

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

Referenced by preview().

◆ $requested_ppage

ilObjPortfolioBaseGUI::$requested_ppage
protected

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

Referenced by determinePageCall().

◆ $requested_user_page

ilObjPortfolioBaseGUI::$requested_user_page
protected

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

Referenced by determinePageCall(), and preview().

◆ $ui

ilObjPortfolioBaseGUI::$ui
protected

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

Referenced by view().

◆ $user_id

ilObjPortfolioBaseGUI::$user_id
protected

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

Referenced by preview().


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