ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 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 ()
 list childs of current object 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...
 

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 ()
 
 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...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) 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...
 
 showMountWebfolderIcon ()
 
 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 = ""
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
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 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
Version
$Id$

Definition at line 16 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 49 of file class.ilObjPortfolioBaseGUI.php.

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->main_menu = $DIC["ilMainMenu"];
60 $this->tpl = $DIC["tpl"];
61 $ilUser = $DIC->user();
62
63 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
64
65 $this->user_id = $ilUser->getId();
66
67 $this->lng->loadLanguageModule("prtf");
68 $this->lng->loadLanguageModule("user");
69 $this->lng->loadLanguageModule("obj");
70
71 $this->requested_ppage = (int) $_REQUEST["ppage"];
72 $this->requested_user_page = (int) $_REQUEST["user_page"];
73
74 // temp sanitization, should be done smarter in the future
75 $back = str_replace("&", ":::", $_REQUEST["back_url"]);
76 $back = preg_replace(
77 "/[^a-zA-Z0-9_\.\?=:\s]/",
78 "",
79 $back
80 );
81 $this->requested_back_url = str_replace(":::", "&", $back);
82
83 $this->ctrl->setParameterbyClass("ilobjportfoliogui", "back_url", rawurlencode($this->requested_back_url));
84 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2
$ilUser
Definition: imgupload.php:18

References $DIC, $ilUser, settings(), 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 484 of file class.ilObjPortfolioBaseGUI.php.

485 {
486 $ilHelp = $this->help;
487
488 $this->tabs_gui->clearTargets();
489 $this->tabs_gui->setBackTarget(
490 $this->lng->txt("back"),
491 $this->ctrl->getLinkTarget($this, "view")
492 );
493
494 $ilHelp->setScreenIdComponent("prtf");
495 $ilHelp->setScreenId("add_blog");
496
497 $form = $this->initBlogForm();
498 $this->tpl->setContent($form->getHTML());
499 }
if(isset($_POST['submit'])) $form

References $form, $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 86 of file class.ilObjPortfolioBaseGUI.php.

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

References ilObjectGUI\$locator, $title, 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 374 of file class.ilObjPortfolioBaseGUI.php.

375 {
376 $ilHelp = $this->help;
377
378 $this->tabs_gui->clearTargets();
379 $this->tabs_gui->setBackTarget(
380 $this->lng->txt("back"),
381 $this->ctrl->getLinkTarget($this, "view")
382 );
383
384 $ilHelp->setScreenIdComponent("prtf");
385 $ilHelp->setScreenId("add_page");
386
387
388 $form = $this->initPageForm("create");
389 $this->tpl->setContent($form->getHTML());
390 }
initPageForm($a_mode="create")
Init portfolio page form.

References $form, $help, and initPageForm().

+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( )

Confirm portfolio deletion.

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

542 {
543 $prtf_pages = $_REQUEST["prtf_pages"];
544
545 if (!is_array($prtf_pages) || count($prtf_pages) == 0) {
546 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
547 $this->ctrl->redirect($this, "view");
548 } else {
549 $this->tabs_gui->activateTab("pages");
550
551 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
552 $cgui = new ilConfirmationGUI();
553 $cgui->setFormAction($this->ctrl->getFormAction($this));
554 $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
555 $cgui->setCancel($this->lng->txt("cancel"), "view");
556 $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
557
558 foreach ($prtf_pages as $id) {
559 $page = $this->getPageInstance((int) $id);
560 if ($page->getPortfolioId() != $this->object->getId()) {
561 continue;
562 }
563
564 $title = $page->getTitle();
565 if ($page->getType() == ilPortfolioPage::TYPE_BLOG) {
566 $title = $this->lng->txt("obj_blog") . ": " . ilObject::_lookupTitle((int) $title);
567 }
568 $cgui->addItem("prtf_pages[]", $id, $title);
569 }
570
571 $this->tpl->setContent($cgui->getHTML());
572 }
573 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id

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

+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

883 {
884 $form = $this->initCopyPageForm();
885 if ($form->checkInput()) {
886 // existing
887 if ($form->getInput("target") == "old") {
888 $portfolio_id = $form->getInput("prtf");
889 }
890 // new
891 else {
892 $portfolio = new ilObjPortfolio();
893 $portfolio->setTitle($form->getInput("title"));
894 $portfolio->create();
895 $portfolio_id = $portfolio->getId();
896 }
897
898 // copy page(s)
899 foreach ($_POST["prtf_pages"] as $page_id) {
900 $source = $this->getPageInstance($page_id);
901 $target = $this->getPageInstance(null, $portfolio_id);
902 $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
903 $target->setType($source->getType());
904 $target->setTitle($source->getTitle());
905 $target->create();
906 }
907
908 ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
909 $this->ctrl->redirect($this, "view");
910 }
911
912 $form->setValuesByPost();
913 $this->copyPageForm($form);
914 }
$source
Definition: linkback.php:22
$_POST["username"]
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
$target
Definition: test.php:19

References $_POST, $form, $page_id, $source, $target, 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 858 of file class.ilObjPortfolioBaseGUI.php.

859 {
860 $prtf_pages = $_REQUEST["prtf_pages"];
861
862 if (!is_array($prtf_pages) || count($prtf_pages) == 0) {
863 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
864 $this->ctrl->redirect($this, "view");
865 } else {
866 $this->tabs_gui->activateTab("pages");
867
868 if (!$a_form) {
869 $a_form = $this->initCopyPageForm();
870 }
871
872 foreach ($prtf_pages as $page_id) {
873 $item = new ilHiddenInputGUI("prtf_pages[]");
874 $item->setValue((int) $page_id);
875 $a_form->addItem($item);
876 }
877
878 $this->tpl->setContent($a_form->getHTML());
879 }
880 }
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 1028 of file class.ilObjPortfolioBaseGUI.php.

1029 {
1030 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1031 }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

579 {
580 if (!$this->checkPermissionBool("write")) {
581 return;
582 }
583
584 if (is_array($_POST["prtf_pages"])) {
585 foreach ($_POST["prtf_pages"] as $id) {
586 $page = $this->getPageInstance($id);
587 $page->delete();
588 }
589 }
590 ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
591 $this->ctrl->redirect($this, "view");
592 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.

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

+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

1039 {
1040 $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
1041 }

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

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

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

1034 {
1035 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1036 }

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

957 {
958 $this->checkPermission("write");
959
960 $this->tabs_gui->activateTab("settings");
961 $this->setSettingsSubTabs("style");
962
964 $this->tpl->setContent($form->getHTML());
965 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

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

+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

846 {
847 include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
848 $export = new ilPortfolioHTMLExport($this, $this->object);
849 $zip = $export->buildExportFile();
850
851 ilUtil::deliverFile($zip, $this->object->getTitle() . ".zip", '', false, true);
852 }
Portfolio HTML exporter class.
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().

+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

Definition at line 191 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 277 of file class.ilObjPortfolioBaseGUI.php.

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

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

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

919 {
920 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
921 $form = new ilPropertyFormGUI();
922 $form->setFormAction($this->ctrl->getFormAction($this));
923 $form->setTitle($this->lng->txt("prtf_copy_page"));
924
926
927 $form->addCommandButton("copyPage", $this->lng->txt("save"));
928 $form->addCommandButton("view", $this->lng->txt("cancel"));
929
930 return $form;
931 }
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
This class represents a property form user interface.

References $form, and 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 233 of file class.ilObjPortfolioBaseGUI.php.

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

References $img, $section, ilPropertyFormGUI\addItem(), ilFileInputGUI\setPersonalWorkspaceQuotaCheck(), 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 398 of file class.ilObjPortfolioBaseGUI.php.

399 {
400 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
401 $form = new ilPropertyFormGUI();
402 $form->setFormAction($this->ctrl->getFormAction($this));
403
404 // title
405 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
406 $ti->setMaxLength(200);
407 $ti->setRequired(true);
408 $form->addItem($ti);
409
410 // save and cancel commands
411 if ($a_mode == "create") {
412 include_once "Services/COPage/Layout/classes/class.ilPageLayout.php";
414 if ($templates) {
415 $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
416 $use_template->setRequired(true);
417 $form->addItem($use_template);
418
419 $opt = new ilRadioOption($this->lng->txt("none"), 0);
420 $use_template->addOption($opt);
421
422 foreach ($templates as $templ) {
423 $templ->readObject();
424
425 $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
426 $use_template->addOption($opt);
427 }
428 }
429
430 $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
431 $this->object->getTitle());
432 $form->addCommandButton("savePage", $this->lng->txt("save"));
433 $form->addCommandButton("view", $this->lng->txt("cancel"));
434 } else {
435 /* edit is done directly in table gui
436 $form->setTitle($this->lng->txt("prtf_edit_page"));
437 $form->addCommandButton("updatePage", $this->lng->txt("save"));
438 $form->addCommandButton("view", $this->lng->txt("cancel"));
439 */
440 }
441
442 return $form;
443 }
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 $form, 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 967 of file class.ilObjPortfolioBaseGUI.php.

968 {
970
971 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
972 $this->lng->loadLanguageModule("style");
973
974 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
975 $form = new ilPropertyFormGUI();
976
977 $fixed_style = $ilSetting->get("fixed_content_style_id");
978 $style_id = $this->object->getStyleSheetId();
979
980 if ($fixed_style > 0) {
981 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
982 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
983 $this->lng->txt("global_fixed") . ")");
984 $form->addItem($st);
985 } else {
987 true,
988 false,
989 $_GET["ref_id"]
990 );
991
992 $st_styles[0] = $this->lng->txt("default");
993 ksort($st_styles);
994
995 if ($style_id > 0) {
996 // individual style
997 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
998 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
999 $st->setValue(ilObject::_lookupTitle($style_id));
1000 $form->addItem($st);
1001
1002 // delete command
1003 $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
1004 $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
1005 }
1006 }
1007
1008 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1009 $style_sel = new ilSelectInputGUI(
1010 $this->lng->txt("style_current_style"),
1011 "style_id"
1012 );
1013 $style_sel->setOptions($st_styles);
1014 $style_sel->setValue($style_id);
1015 $form->addItem($style_sel);
1016
1017 $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
1018 $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
1019 }
1020 }
1021
1022 $form->setTitle($this->lng->txt($this->getType() . "_style"));
1023 $form->setFormAction($this->ctrl->getFormAction($this));
1024
1025 return $form;
1026 }
$_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, $form, $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 597 of file class.ilObjPortfolioBaseGUI.php.

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

References $_GET, $a_content, $ilSetting, $ilUser, $main_menu, ilObject2GUI\$parent_id, $requested_back_url, $requested_user_page, ilObjectGUI\$settings, ilObject2GUI\$tree, ilObjectGUI\$user, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), ilObject2GUI\checkPermissionBool(), ilPortfolioPage\getAllPortfolioPages(), getPageGUIInstance(), ilObject2GUI\getType(), ilMainMenuGUI\MODE_TOPBAR_ONLY, renderFullscreenHeader(), setContentStyleSheet(), 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 787 of file class.ilObjPortfolioBaseGUI.php.

788 {
789 global $DIC;
790
791 $ilUser = $DIC->user();
792
793 if (!$a_export) {
794 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
796 $a_portfolio->getType(),
797 ($a_portfolio->getType() == "prtt")
798 ? $a_portfolio->getRefId()
799 : $a_portfolio->getId(),
800 $a_portfolio->getId(),
801 $ilUser->getId()
802 );
803 }
804
805 $name = ilObjUser::_lookupName($a_user_id);
806 $name = $name["lastname"] . ", " . ($t = $name["title"] ? $t . " " : "") . $name["firstname"];
807
808 // show banner?
809 $banner = $banner_width = $banner_height = false;
810 $prfa_set = new ilSetting("prfa");
811 if ($prfa_set->get("banner")) {
812 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
813 $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
814 $banner_width = $prfa_set->get("banner_width");
815 $banner_height = $prfa_set->get("banner_height");
816 if ($a_export) {
817 $banner = basename($banner);
818 }
819 }
820
821 // profile picture
822 $ppic = null;
823 if ($a_portfolio->hasProfilePicture()) {
824 $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
825 if ($a_export) {
826 $ppic = basename($ppic);
827 }
828 }
829
830 $a_tpl->resetHeaderBlock(false);
831 // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
832 $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
833 $a_tpl->setTitleIcon($ppic);
834 $a_tpl->setTitle($a_portfolio->getTitle());
835 // $a_tpl->setTitleColor($a_portfolio->getFontColor());
836 $a_tpl->setDescription($name);
837
838 // to get rid of locator in portfolio template preview
839 $a_tpl->setVariable("LOCATOR", "");
840
841 // :TODO: obsolete?
842 // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
843 }
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 _lookupName($a_user_id)
lookup user name
static signFile($path_to_file)

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

Referenced by ilPortfolioHTMLExport\buildExportTemplate(), and 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 448 of file class.ilObjPortfolioBaseGUI.php.

449 {
450 $form = $this->initPageForm("create");
451 if ($form->checkInput() && $this->checkPermissionBool("write")) {
452 include_once("Modules/Portfolio/classes/class.ilPortfolioPage.php");
453 $page = $this->getPageInstance();
454 $page->setType(ilPortfolioPage::TYPE_PAGE);
455 $page->setTitle($form->getInput("title"));
456
457 // use template as basis
458 $layout_id = $form->getInput("tmpl");
459 if ($layout_id) {
460 include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
461 $layout_obj = new ilPageLayout($layout_id);
462 $page->setXMLContent($layout_obj->getXMLContent());
463 }
464
465 $page->create();
466
467 ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
468 $this->ctrl->redirect($this, "view");
469 }
470
471 $this->tabs_gui->clearTargets();
472 $this->tabs_gui->setBackTarget(
473 $this->lng->txt("back"),
474 $this->ctrl->getLinkTarget($this, "view")
475 );
476
477 $form->setValuesByPost();
478 $this->tpl->setContent($form->getHtml());
479 }
Class ilPageLayout.

References $form, 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 508 of file class.ilObjPortfolioBaseGUI.php.

509 {
510 if (!$this->checkPermissionBool("write")) {
511 return;
512 }
513
514 $title_changes = array();
515
516 if (is_array($_POST["order"])) {
517 foreach ($_POST["order"] as $k => $v) {
518 $page = $this->getPageInstance(ilUtil::stripSlashes($k));
519 if ($_POST["title"][$k]) {
520 $new_title = trim(ilUtil::stripSlashes($_POST["title"][$k]));
521 if ($page->getTitle() != $new_title) {
522 $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
523 $page->setTitle($new_title);
524 }
525 }
526 $page->setOrderNr(ilUtil::stripSlashes($v));
527 $page->update();
528 }
529 ilPortfolioPage::fixOrdering($this->object->getId());
530 }
531
532 $this->object->fixLinksOnTitleChange($title_changes);
533
534 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
535 $this->ctrl->redirect($this, "view");
536 }
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 1043 of file class.ilObjPortfolioBaseGUI.php.

1044 {
1046
1047 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1048 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1049 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1050 || $this->object->getStyleSheetId() == 0)) {
1051 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1052 $this->object->update();
1053
1054 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1055 }
1056 $this->ctrl->redirect($this, "editStyleProperties");
1057 }

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

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

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet (   $a_tpl = null)

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

939 {
941
942 if ($a_tpl != null) {
943 $ctpl = $a_tpl;
944 } else {
945 $ctpl = $tpl;
946 }
947
948 $ctpl->setCurrentBlock("ContentStyle");
949 $ctpl->setVariable(
950 "LOCATION_CONTENT_STYLESHEET",
951 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
952 );
953 $ctpl->parseCurrentBlock();
954 }
static getContentStylePath($a_style_id, $add_random=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 202 of file class.ilObjPortfolioBaseGUI.php.

203 {
204 $this->perma_link = array("obj_id" => $a_obj_id, "type" => $a_type);
205 }
$a_type
Definition: workflow.php:92

References $a_type.

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

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

References ilObject2GUI\getType().

Referenced by editStyleProperties(), and initEditCustomForm().

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

288 {
289 $this->object->setPublicComments($a_form->getInput("comments"));
290 $this->object->setProfilePicture($a_form->getInput("ppic"));
291 /*
292 $this->object->setBackgroundColor($a_form->getInput("bg_color"));
293 $this->object->setFontcolor($a_form->getInput("font_color"));
294 */
295
296 $prfa_set = new ilSetting("prfa");
297
298 if ($_FILES["banner"]["tmp_name"]) {
299 $this->object->uploadImage($_FILES["banner"]);
300 } elseif ($prfa_set->get('banner') and $a_form->getItemByPostVar("banner")->getDeletionFlag()) {
301 $this->object->deleteImage();
302 }
303 }
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 319 of file class.ilObjPortfolioBaseGUI.php.

320 {
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 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
332
333 $button = ilLinkButton::getInstance();
334 $button->setCaption("prtf_add_page");
335 $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
336 $ilToolbar->addStickyItem($button);
337
338 if (!$ilSetting->get('disable_wsp_blogs')) {
339 $button = ilLinkButton::getInstance();
340 $button->setCaption("prtf_add_blog");
341 $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
342 $ilToolbar->addStickyItem($button);
343 }
344
345
346 // #16571
347 if ($this->getType() == "prtf") {
348 $ilToolbar->addSeparator();
349
350 $button = ilLinkButton::getInstance();
351 $button->setCaption("export_html");
352 $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
353 $ilToolbar->addButtonInstance($button);
354
355 $button = ilLinkButton::getInstance();
356 $button->setCaption("prtf_pdf");
357 $button->setUrl($this->ctrl->getLinkTarget($this, "exportPDFSelection"));
358 $ilToolbar->addButtonInstance($button);
359 }
360
361 include_once "Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
362 $table = new ilPortfolioPageTableGUI($this, "view");
363
364 // exercise portfolio?
365 include_once "Modules/Portfolio/classes/class.ilPortfolioExerciseGUI.php";
366 $message = ilPortfolioExerciseGUI::checkExercise($this->user_id, $this->object->getId(), $table->dataExists());
367
368 $this->tpl->setContent($message . $table->getHTML());
369 }
static getInstance()
Factory.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false, $as_array=false)
catch(Exception $e) $message
if(empty($password)) $table
Definition: pwgen.php:24

References $ilSetting, $message, ilObjectGUI\$settings, $table, ilObjectGUI\$toolbar, ilObject2GUI\$tree, ilPortfolioExerciseGUI\checkExercise(), 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 29 of file class.ilObjPortfolioBaseGUI.php.

Referenced by getAdditional().

◆ $help

ilObjPortfolioBaseGUI::$help
protected

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

Referenced by addBlog(), and addPage().

◆ $main_menu

ilObjPortfolioBaseGUI::$main_menu
protected

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

Referenced by preview().

◆ $page_id

ilObjPortfolioBaseGUI::$page_id
protected

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

Referenced by copyPage(), and copyPageForm().

◆ $page_mode

ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

ilObjPortfolioBaseGUI::$perma_link
protected

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

◆ $requested_back_url

ilObjPortfolioBaseGUI::$requested_back_url = ""
protected

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

Referenced by preview().

◆ $requested_ppage

ilObjPortfolioBaseGUI::$requested_ppage
protected

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

Referenced by determinePageCall().

◆ $requested_user_page

ilObjPortfolioBaseGUI::$requested_user_page
protected

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

Referenced by determinePageCall(), and preview().

◆ $user_id

ilObjPortfolioBaseGUI::$user_id
protected

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

Referenced by preview().


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