ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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)
 
 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)
 
 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)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 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...
 
- 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object 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...
 

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 ()
 
 determinePageCall ()
 
 handlePageCall ($a_cmd)
 
 setSettingsSubTabs ($a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 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 ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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...
 
 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...
 
 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

 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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
 
 $ilias
 
 $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 
)

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

References $ilUser.

25  {
26  global $ilUser;
27 
28  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
29 
30  $this->user_id = $ilUser->getId();
31 
32  $this->lng->loadLanguageModule("prtf");
33  $this->lng->loadLanguageModule("user");
34  }
$ilUser
Definition: imgupload.php:18

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

References initBlogForm(), and saveBlog().

436  {
437  global $ilHelp;
438 
439  $this->tabs_gui->clearTargets();
440  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
441  $this->ctrl->getLinkTarget($this, "view"));
442 
443  $ilHelp->setScreenIdComponent("prtf");
444  $ilHelp->setScreenId("add_blog");
445 
446  $form = $this->initBlogForm();
447  $this->tpl->setContent($form->getHTML());
448  }
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

References $title, ilObject\_lookupTitle(), getPageGUIClassName(), getPageInstance(), object, and ilPortfolioPage\TYPE_BLOG.

37  {
38  global $ilLocator;
39 
40  if($this->object)
41  {
42  $ilLocator->addItem(strip_tags($this->object->getTitle()),
43  $this->ctrl->getLinkTarget($this, "view"));
44  }
45 
46  if($this->page_id)
47  {
48  $page = $this->getPageInstance($this->page_id);
49  $title = $page->getTitle();
50  if($page->getType() == ilPortfolioPage::TYPE_BLOG)
51  {
53  }
54  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
55  $ilLocator->addItem($title,
56  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit"));
57  }
58  }
static _lookupTitle($a_id)
lookup object title
Create new PHPExcel object
obj_idprivate
getPageInstance($a_page_id=null, $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

References initPageForm().

323  {
324  global $ilHelp;
325 
326  $this->tabs_gui->clearTargets();
327  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
328  $this->ctrl->getLinkTarget($this, "view"));
329 
330  $ilHelp->setScreenIdComponent("prtf");
331  $ilHelp->setScreenId("add_page");
332 
333 
334  $form = $this->initPageForm("create");
335  $this->tpl->setContent($form->getHTML());
336  }
initPageForm($a_mode="create")
Init portfolio page form.
+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( )

Confirm portfolio deletion.

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

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

487  {
488  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
489  {
490  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
491  $this->ctrl->redirect($this, "view");
492  }
493  else
494  {
495  $this->tabs_gui->activateTab("pages");
496 
497  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
498  $cgui = new ilConfirmationGUI();
499  $cgui->setFormAction($this->ctrl->getFormAction($this));
500  $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
501  $cgui->setCancel($this->lng->txt("cancel"), "view");
502  $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
503 
504  foreach ($_POST["prtf_pages"] as $id)
505  {
506  $page = $this->getPageInstance($id);
507  $title = $page->getTitle();
508  if($page->getType() == ilPortfolioPage::TYPE_BLOG)
509  {
510  $title = $this->lng->txt("obj_blog").": ".ilObject::_lookupTitle((int)$title);
511  }
512  $cgui->addItem("prtf_pages[]", $id, $title);
513  }
514 
515  $this->tpl->setContent($cgui->getHTML());
516  }
517  }
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

References $_POST, $page_id, $target, copyPageForm(), getPageInstance(), initCopyPageForm(), initCopyPageFormOptions(), and ilUtil\sendSuccess().

871  {
872  $form = $this->initCopyPageForm();
873  if($form->checkInput())
874  {
875  // existing
876  if($form->getInput("target") == "old")
877  {
878  $portfolio_id = $form->getInput("prtf");
879  }
880  // new
881  else
882  {
883  $portfolio = new ilObjPortfolio();
884  $portfolio->setTitle($form->getInput("title"));
885  $portfolio->create();
886  $portfolio_id = $portfolio->getId();
887  }
888 
889  // copy page(s)
890  foreach($_POST["prtf_pages"] as $page_id)
891  {
892  $source = $this->getPageInstance($page_id);
893  $target = $this->getPageInstance(null, $portfolio_id);
894  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
895  $target->setType($source->getType());
896  $target->setTitle($source->getTitle());
897  $target->create();
898  }
899 
900  ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
901  $this->ctrl->redirect($this, "view");
902  }
903 
904  $form->setValuesByPost();
905  $this->copyPageForm($form);
906  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm (   $a_form = null)

Select target portfolio for page(s) copy.

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

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

Referenced by copyPage().

844  {
845  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
846  {
847  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
848  $this->ctrl->redirect($this, "view");
849  }
850  else
851  {
852  $this->tabs_gui->activateTab("pages");
853 
854  if(!$a_form)
855  {
856  $a_form = $this->initCopyPageForm();
857  }
858 
859  foreach($_POST["prtf_pages"] as $page_id)
860  {
861  $item = new ilHiddenInputGUI("prtf_pages[]");
862  $item->setValue($page_id);
863  $a_form->addItem($item);
864  }
865 
866  $this->tpl->setContent($a_form->getHTML());
867  }
868  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
This class represents a hidden form property in a property form.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createStyle()

ilObjPortfolioBaseGUI::createStyle ( )

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

1023  {
1024  $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1025  }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

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

523  {
524  if(!$this->checkPermissionBool("write"))
525  {
526  return;
527  }
528 
529  if (is_array($_POST["prtf_pages"]))
530  {
531  foreach ($_POST["prtf_pages"] as $id)
532  {
533  $page = $this->getPageInstance($id);
534  $page->delete();
535  }
536  }
537  ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
538  $this->ctrl->redirect($this, "view");
539  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

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

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

References ilObject2GUI\checkPermissionBool().

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

61  {
62  // edit
63  if(isset($_REQUEST["ppage"]))
64  {
65  if(!$this->checkPermissionBool("write"))
66  {
67  $this->ctrl->redirect($this, "view");
68  }
69 
70  $this->page_id = $_REQUEST["ppage"];
71  $this->page_mode = "edit";
72  $this->ctrl->setParameter($this, "ppage", $this->page_id);
73  return true;
74  }
75  // preview
76  else
77  {
78  $this->page_id = $_REQUEST["user_page"];
79  $this->page_mode = "preview";
80  $this->ctrl->setParameter($this, "user_page", $this->page_id);
81  return false;
82  }
83  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editStyle()

ilObjPortfolioBaseGUI::editStyle ( )

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

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

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

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

950  {
951  $this->checkPermission("write");
952 
953  $this->tabs_gui->activateTab("settings");
954  $this->setSettingsSubTabs("style");
955 
956  $form = $this->initStylePropertiesForm();
957  $this->tpl->setContent($form->getHTML());
958  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

References ilUtil\deliverFile(), and object.

831  {
832  include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
833  $export = new ilPortfolioHTMLExport($this, $this->object);
834  $zip = $export->buildExportFile();
835 
836  ilUtil::deliverFile($zip, $this->object->getTitle().".zip", '', false, true);
837  }
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.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ getAdditional()

ilObjPortfolioBaseGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

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

References $additional.

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

145  {
146  return $this->additional;
147  }
+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array $a_values)
protected

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

224  {
225  $a_values["comments"] = $this->object->hasPublicComments();
226  $a_values["ppic"] = $this->object->hasProfilePicture();
227  /*
228  $a_values["bg_color"] = $this->object->getBackgroundColor();
229  $a_values["font_color"] = $this->object->getFontColor();
230  */
231  }

◆ getPageGUIClassName()

ilObjPortfolioBaseGUI::getPageGUIClassName ( )
abstract

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

+ Here is the caller graph for this function:

◆ getPageGUIInstance()

ilObjPortfolioBaseGUI::getPageGUIInstance (   $a_page_id)
abstractprotected

Referenced by handlePageCall(), preview(), and updateCustom().

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

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

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

86  {
87  $this->tabs_gui->clearTargets();
88  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
89  $this->ctrl->getLinkTarget($this, "view"));
90 
91  if(!$this->page_id)
92  {
93  $this->ctrl->redirect($this, "view");
94  }
95 
96  $page_gui = $this->getPageGUIInstance($this->page_id);
97 
98  // needed for editor
99  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
100  $this->object->getStyleSheetId(), $this->getType()));
101 
102  $ret = $this->ctrl->forwardCommand($page_gui);
103 
104  if ($ret != "" && $ret !== true)
105  {
106  // preview (fullscreen)
107  if($this->page_mode == "preview")
108  {
109  // embedded call which did not generate any output (e.g. calendar month navigation)
111  {
112  // suppress (portfolio) notes for blog postings
113  $this->preview(false, $ret, ($a_cmd != "previewEmbedded"));
114  }
115  else
116  {
117  $this->preview(false);
118  }
119  }
120  // edit
121  else
122  {
123  $this->setContentStyleSheet();
124  $this->tpl->setContent($ret);
125  }
126  }
127  }
getType()
Functions that must be overwritten.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getPageGUIInstance($a_page_id)
Create new PHPExcel object
obj_idprivate
$ret
Definition: parser.php:6
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initBlogForm()

ilObjPortfolioBaseGUI::initBlogForm ( )
abstractprotected

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

References initCopyPageFormOptions().

Referenced by copyPage(), and copyPageForm().

911  {
912  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
913  $form = new ilPropertyFormGUI();
914  $form->setFormAction($this->ctrl->getFormAction($this));
915  $form->setTitle($this->lng->txt("prtf_copy_page"));
916 
917  $this->initCopyPageFormOptions($form);
918 
919  $form->addCommandButton("copyPage", $this->lng->txt("save"));
920  $form->addCommandButton("view", $this->lng->txt("cancel"));
921 
922  return $form;
923  }
This class represents a property form user interface.
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
abstractprotected

Referenced by copyPage(), and initCopyPageForm().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

References $file, $img, ilPropertyFormGUI\addItem(), ilFileInputGUI\setPersonalWorkspaceQuotaCheck(), and setSettingsSubTabs().

Referenced by ilObjPortfolioGUI\initEditForm().

183  {
184  $this->setSettingsSubTabs("properties");
185 
186  // comments
187  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
188  $a_form->addItem($comments);
189 
190  // profile picture
191  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
192  $a_form->addItem($ppic);
193 
194  $prfa_set = new ilSetting("prfa");
195  if($prfa_set->get("banner"))
196  {
197  include_once "Services/Form/classes/class.ilFileInputGUI.php";
199 
200  $dimensions = " (".$prfa_set->get("banner_width")."x".
201  $prfa_set->get("banner_height").")";
202 
203  $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner").$dimensions, "banner");
204  $a_form->addItem($img);
205 
206  // show existing file
207  $file = $this->object->getImageFullPath(true);
208  if($file)
209  {
210  $img->setImage($file);
211  }
212  }
213 
214  /* #15000
215  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
216  $a_form->addItem($bg_color);
217 
218  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
219  $a_form->addItem($font_color);
220  */
221  }
ILIAS Setting Class.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
static setPersonalWorkspaceQuotaCheck($a_value)
This class represents an image file property in a property form.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
+ 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 344 of file class.ilObjPortfolioBaseGUI.php.

References ilPageLayout\activeLayouts(), ilPageLayout\MODULE_PORTFOLIO, ilTextInputGUI\setMaxLength(), ilFormPropertyGUI\setRequired(), and ilRadioOption\setTitle().

Referenced by addPage(), and savePage().

345  {
346  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
347  $form = new ilPropertyFormGUI();
348  $form->setFormAction($this->ctrl->getFormAction($this));
349 
350  // title
351  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
352  $ti->setMaxLength(200);
353  $ti->setRequired(true);
354  $form->addItem($ti);
355 
356  // save and cancel commands
357  if ($a_mode == "create")
358  {
359  include_once "Services/COPage/Layout/classes/class.ilPageLayout.php";
361  if($templates)
362  {
363  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
364  $use_template->setRequired(true);
365  $form->addItem($use_template);
366 
367  $opt = new ilRadioOption($this->lng->txt("none"), 0);
368  $use_template->addOption($opt);
369 
370  foreach ($templates as $templ)
371  {
372  $templ->readObject();
373 
374  $opt = new ilRadioOption($templ->getTitle().$templ->getPreview(), $templ->getId());
375  $use_template->addOption($opt);
376  }
377  }
378 
379  $form->setTitle($this->lng->txt("prtf_add_page").": ".
380  $this->object->getTitle());
381  $form->addCommandButton("savePage", $this->lng->txt("save"));
382  $form->addCommandButton("view", $this->lng->txt("cancel"));
383  }
384  else
385  {
386  /* edit is done directly in table gui
387  $form->setTitle($this->lng->txt("prtf_edit_page"));
388  $form->addCommandButton("updatePage", $this->lng->txt("save"));
389  $form->addCommandButton("view", $this->lng->txt("cancel"));
390  */
391  }
392 
393  return $form;
394  }
This class represents an option in a radio group.
setTitle($a_title)
Set Title.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilObjPortfolioBaseGUI::initStylePropertiesForm ( )

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

References $_GET, $ilSetting, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), ilSelectInputGUI\setOptions(), and ilNonEditableValueGUI\setValue().

Referenced by editStyleProperties().

961  {
962  global $ilSetting;
963 
964  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
965  $this->lng->loadLanguageModule("style");
966 
967  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
968  $form = new ilPropertyFormGUI();
969 
970  $fixed_style = $ilSetting->get("fixed_content_style_id");
971  $style_id = $this->object->getStyleSheetId();
972 
973  if ($fixed_style > 0)
974  {
975  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
976  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
977  $this->lng->txt("global_fixed").")");
978  $form->addItem($st);
979  }
980  else
981  {
982  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
983  $_GET["ref_id"]);
984 
985  $st_styles[0] = $this->lng->txt("default");
986  ksort($st_styles);
987 
988  if ($style_id > 0)
989  {
990  // individual style
991  if (!ilObjStyleSheet::_lookupStandard($style_id))
992  {
993  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
994  $st->setValue(ilObject::_lookupTitle($style_id));
995  $form->addItem($st);
996 
997  // delete command
998  $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
999  $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
1000  }
1001  }
1002 
1003  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1004  {
1005  $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"),
1006  "style_id");
1007  $style_sel->setOptions($st_styles);
1008  $style_sel->setValue($style_id);
1009  $form->addItem($style_sel);
1010 
1011  $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
1012  $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
1013  }
1014  }
1015 
1016  $form->setTitle($this->lng->txt($this->getType()."_style"));
1017  $form->setFormAction($this->ctrl->getFormAction($this));
1018 
1019  return $form;
1020  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupTitle($a_id)
lookup object title
static _lookupStandard($a_id)
Lookup standard flag.
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
+ 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.

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

References $_GET, $a_content, $ilSetting, $ilUser, ilObject2GUI\$parent_id, ilObject2GUI\$tree, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), array, ilObject2GUI\checkPermissionBool(), ilPortfolioPage\getAllPortfolioPages(), getPageGUIInstance(), ilObject2GUI\getType(), ilMainMenuGUI\MODE_TOPBAR_ONLY, object, setContentStyleSheet(), and ilPortfolioPage\TYPE_BLOG.

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

545  {
546  global $ilSetting, $ilUser;
547 
548  $portfolio_id = $this->object->getId();
549  $user_id = $this->object->getOwner();
550 
551  $this->tabs_gui->clearTargets();
552 
553  $pages = ilPortfolioPage::getAllPortfolioPages($portfolio_id);
554  $current_page = (int)$_GET["user_page"];
555 
556  // validate current page
557  if($pages && $current_page)
558  {
559  $found = false;
560  foreach($pages as $page)
561  {
562  if($page["id"] == $current_page)
563  {
564  $found = true;
565  break;
566  }
567  }
568  if(!$found)
569  {
570  $current_page = null;
571  }
572  }
573 
574  // display first page of portfolio if none given
575  if(!$current_page && $pages)
576  {
577  $current_page = $pages;
578  $current_page = array_shift($current_page);
579  $current_page = $current_page["id"];
580  }
581 
582  // #13788 - keep page after login
583  if($this->user_id == ANONYMOUS_USER_ID &&
584  $this->getType() == "prtf")
585  {
586  $this->tpl->setLoginTargetPar("prtf_".$this->object->getId()."_".$current_page);
587  }
588 
589  $back_caption = "";
590 
591  // public profile
592  if($_REQUEST["back_url"])
593  {
594  $back = $_REQUEST["back_url"];
595  }
596  else if($_GET["baseClass"] != "ilPublicUserProfileGUI" &&
597  $this->user_id && $this->user_id != ANONYMOUS_USER_ID)
598  {
599  if(!$this->checkPermissionBool("write"))
600  {
601  // shared
602  if($this->getType() == "prtf")
603  {
604  $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", $this->object->getOwner());
605  $back = $this->ctrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui"), "showOther");
606  $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", "");
607  }
608  // listgui / parent container
609  else
610  {
611  // #12819
612  global $tree;
613  $parent_id = $tree->getParentId($this->node_id);
614  include_once "Services/Link/classes/class.ilLink.php";
616  }
617  }
618  // owner
619  else
620  {
621  $back = $this->ctrl->getLinkTarget($this, "view");
622  if($this->getType() == "prtf")
623  {
624  $back_caption = $this->lng->txt("prtf_back_to_portfolio_owner");
625  }
626  else
627  {
628  // #19316
629  $this->lng->loadLanguageModule("prtt");
630  $back_caption = $this->lng->txt("prtt_edit");
631  }
632  }
633  }
634 
635  global $ilMainMenu;
636  $ilMainMenu->setMode(ilMainMenuGUI::MODE_TOPBAR_ONLY);
637  if($back)
638  {
639  // might already be set in ilPublicUserProfileGUI
640  $ilMainMenu->setTopBarBack($back, $back_caption);
641  }
642 
643  // render tabs
644  $current_blog = null;
645  if(count($pages) > 1)
646  {
647  foreach ($pages as $p)
648  {
649  if($p["type"] == ilPortfolioPage::TYPE_BLOG)
650  {
651  // needed for blog comments (see below)
652  if($p["id"] == $current_page)
653  {
654  $current_blog = (int)$p["title"];
655  }
656  include_once "Modules/Blog/classes/class.ilObjBlog.php";
657  $p["title"] = ilObjBlog::_lookupTitle($p["title"]);
658  }
659 
660  $this->ctrl->setParameter($this, "user_page", $p["id"]);
661  $this->tabs_gui->addTab("user_page_".$p["id"],
662  $p["title"],
663  $this->ctrl->getLinkTarget($this, "preview"));
664  }
665 
666  $this->tabs_gui->activateTab("user_page_".$current_page);
667  }
668 
669  $this->ctrl->setParameter($this, "user_page", $current_page);
670 
671  if(!$a_content)
672  {
673  // #18291
674  if($current_page)
675  {
676  // get current page content
677  $page_gui = $this->getPageGUIInstance($current_page);
678  $page_gui->setEmbedded(true);
679 
680  $content = $this->ctrl->getHTML($page_gui);
681  }
682  }
683  else
684  {
685  $content = $a_content;
686  }
687 
688  if($a_return && $this->checkPermissionBool("write"))
689  {
690  return $content;
691  }
692 
693  // blog posting comments are handled within the blog
694  $notes = "";
695  if($a_show_notes && $this->object->hasPublicComments() && !$current_blog && $current_page)
696  {
697  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
698  $note_gui = new ilNoteGUI($portfolio_id, $current_page, "pfpg");
699  $note_gui->setRepositoryMode(false);
700  $note_gui->enablePublicNotes(true);
701  $note_gui->enablePrivateNotes(false);
702 
703  $note_gui->enablePublicNotesDeletion(($this->user_id == $user_id) &&
704  $ilSetting->get("comments_del_tutor", 1));
705 
706  $next_class = $this->ctrl->getNextClass($this);
707  if ($next_class == "ilnotegui")
708  {
709  $notes = $this->ctrl->forwardCommand($note_gui);
710  }
711  else
712  {
713  $notes = $note_gui->getNotesHTML();
714  }
715  }
716 
717  if($this->perma_link === null)
718  {
719  if($this->getType() == "prtf")
720  {
721  $this->tpl->setPermanentLink($this->getType(), $this->object->getId(), "_".$current_page);
722  }
723  else
724  {
725  $this->tpl->setPermanentLink($this->getType(), $this->object->getRefId());
726  }
727  }
728  else
729  {
730  $this->tpl->setPermanentLink($this->perma_link["type"], $this->perma_link["obj_id"]);
731  }
732 
733  // #18208 - see ilPortfolioTemplatePageGUI::getPageContentUserId()
734  if($this->getType() == "prtt" && !$this->checkPermissionBool("write"))
735  {
736  $user_id = $ilUser->getId();
737  }
738 
739  self::renderFullscreenHeader($this->object, $this->tpl, $user_id);
740 
741  // #13564
742  $this->ctrl->setParameter($this, "user_page", "");
743  $this->tpl->setTitleUrl($this->ctrl->getLinkTarget($this, "preview"));
744  $this->ctrl->setParameter($this, "user_page", $this->page_id);
745 
746  // blog pages do their own (page) style handling
747  if(!$current_blog)
748  {
749  $content = '<div id="ilCOPageContent" class="ilc_page_cont_PageContainer">'.
750  '<div class="ilc_page_Page">'.
751  $content.
752  '</div></div>';
753 
754  $this->setContentStyleSheet($this->tpl);
755  }
756 
757  // #10717
758  $this->tpl->setContent($content.
759  '<div class="ilClearFloat">'.$notes.'</div>');
760  }
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
static _lookupTitle($a_id)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$_GET["client_id"]
Notes GUI class.
$a_content
Definition: workflow.php:94
getType()
Functions that must be overwritten.
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
getPageGUIInstance($a_page_id)
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
+ 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 769 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilPortfolioHTMLExport\buildExportTemplate().

770  {
771  global $ilUser;
772 
773  if(!$a_export)
774  {
775  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
777  $a_portfolio->getType(),
778  ($a_portfolio->getType() == "prtt")
779  ? $a_portfolio->getRefId()
780  : $a_portfolio->getId(),
781  $a_portfolio->getId(),
782  $ilUser->getId()
783  );
784  }
785 
786  $name = ilObjUser::_lookupName($a_user_id);
787  $name = $name["lastname"].", ".($t = $name["title"] ? $t . " " : "").$name["firstname"];
788 
789  // show banner?
790  $banner = $banner_width = $banner_height = false;
791  $prfa_set = new ilSetting("prfa");
792  if($prfa_set->get("banner"))
793  {
794  require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
795  $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
796  $banner_width = $prfa_set->get("banner_width");
797  $banner_height = $prfa_set->get("banner_height");
798  if($a_export)
799  {
800  $banner = basename($banner);
801  }
802  }
803 
804  // profile picture
805  $ppic = null;
806  if($a_portfolio->hasProfilePicture())
807  {
808  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
809  if($a_export)
810  {
811  $ppic = basename($ppic);
812  }
813  }
814 
815  $a_tpl->resetHeaderBlock(false);
816  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
817  $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
818  $a_tpl->setTitleIcon($ppic);
819  $a_tpl->setTitle($a_portfolio->getTitle());
820  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
821  $a_tpl->setDescription($name);
822 
823  // to get rid of locator in portfolio template preview
824  $a_tpl->setVariable("LOCATOR", "");
825 
826  // :TODO: obsolete?
827  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
828  }
static _lookupName($a_user_id)
lookup user name
ILIAS Setting Class.
$ilUser
Definition: imgupload.php:18
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 signFile($path_to_file)
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveBlog()

ilObjPortfolioBaseGUI::saveBlog ( )
abstractprotected

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ savePage()

ilObjPortfolioBaseGUI::savePage ( )

Create new portfolio page.

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

References ilObject2GUI\checkPermissionBool(), getPageInstance(), initPageForm(), ilUtil\sendSuccess(), and ilPortfolioPage\TYPE_PAGE.

400  {
401  $form = $this->initPageForm("create");
402  if ($form->checkInput() && $this->checkPermissionBool("write"))
403  {
404  include_once("Modules/Portfolio/classes/class.ilPortfolioPage.php");
405  $page = $this->getPageInstance();
406  $page->setType(ilPortfolioPage::TYPE_PAGE);
407  $page->setTitle($form->getInput("title"));
408 
409  // use template as basis
410  $layout_id = $form->getInput("tmpl");
411  if($layout_id)
412  {
413  include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
414  $layout_obj = new ilPageLayout($layout_id);
415  $page->setXMLContent($layout_obj->getXMLContent());
416  }
417 
418  $page->create();
419 
420  ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
421  $this->ctrl->redirect($this, "view");
422  }
423 
424  $this->tabs_gui->clearTargets();
425  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
426  $this->ctrl->getLinkTarget($this, "view"));
427 
428  $form->setValuesByPost();
429  $this->tpl->setContent($form->getHtml());
430  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
Class ilPageLayout.
initPageForm($a_mode="create")
Init portfolio page form.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ savePortfolioPagesOrdering()

ilObjPortfolioBaseGUI::savePortfolioPagesOrdering ( )

Save ordering of portfolio pages.

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

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

458  {
459  if(!$this->checkPermissionBool("write"))
460  {
461  return;
462  }
463 
464  if (is_array($_POST["order"]))
465  {
466  foreach ($_POST["order"] as $k => $v)
467  {
468  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
469  if($_POST["title"][$k])
470  {
471  $page->setTitle(ilUtil::stripSlashes($_POST["title"][$k]));
472  }
473  $page->setOrderNr(ilUtil::stripSlashes($v));
474  $page->update();
475  }
476  ilPortfolioPage::fixOrdering($this->object->getId());
477  }
478 
479  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
480  $this->ctrl->redirect($this, "view");
481  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static fixOrdering($a_portfolio_id)
Fix ordering.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjPortfolioBaseGUI::saveStyleSettings ( )

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

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), object, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

1038  {
1039  global $ilSetting;
1040 
1041  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1042  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1043  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1044  || $this->object->getStyleSheetId() == 0))
1045  {
1046  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1047  $this->object->update();
1048 
1049  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1050  }
1051  $this->ctrl->redirect($this, "editStyleProperties");
1052  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ 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 134 of file class.ilObjPortfolioBaseGUI.php.

135  {
136  $this->additional = $a_additional;
137  }

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet (   $a_tpl = null)

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

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

Referenced by handlePageCall(), and preview().

931  {
932  global $tpl;
933 
934  if ($a_tpl != null)
935  {
936  $ctpl = $a_tpl;
937  }
938  else
939  {
940  $ctpl = $tpl;
941  }
942 
943  $ctpl->setCurrentBlock("ContentStyle");
944  $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
945  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
946  $ctpl->parseCurrentBlock();
947  }
static getContentStylePath($a_style_id)
get content style path
Create new PHPExcel object
obj_idprivate
+ 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 155 of file class.ilObjPortfolioBaseGUI.php.

References $a_type, and array.

156  {
157  $this->perma_link = array("obj_id"=>$a_obj_id, "type"=>$a_type);
158  }
$a_type
Definition: workflow.php:93
Create styles array
The data for the language used.

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

References ilObject2GUI\getType().

Referenced by editStyleProperties(), and initEditCustomForm().

166  {
167  // #17455
168  $this->lng->loadLanguageModule($this->getType());
169 
170  // general properties
171  $this->tabs_gui->addSubTab("properties",
172  $this->lng->txt($this->getType()."_properties"),
173  $this->ctrl->getLinkTarget($this, 'edit'));
174 
175  $this->tabs_gui->addSubTab("style",
176  $this->lng->txt("obj_sty"),
177  $this->ctrl->getLinkTarget($this, 'editStyleProperties'));
178 
179  $this->tabs_gui->activateSubTab($a_active);
180  }
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $a_form)

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

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

234  {
235  $this->object->setPublicComments($a_form->getInput("comments"));
236  $this->object->setProfilePicture($a_form->getInput("ppic"));
237  /*
238  $this->object->setBackgroundColor($a_form->getInput("bg_color"));
239  $this->object->setFontcolor($a_form->getInput("font_color"));
240  */
241 
242  $prfa_set = new ilSetting("prfa");
243 
244  if($_FILES["banner"]["tmp_name"])
245  {
246  $this->object->uploadImage($_FILES["banner"]);
247  }
248  else if($prfa_set->get('banner') and $a_form->getItemByPostVar("banner")->getDeletionFlag())
249  {
250  $this->object->deleteImage();
251  }
252  }
ILIAS Setting Class.
getItemByPostVar($a_post_var)
Get Item by POST variable.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

◆ view()

ilObjPortfolioBaseGUI::view ( )

Show list of portfolio pages.

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

References $ilSetting, ilObject2GUI\$tree, ilPortfolioExerciseGUI\checkExercise(), ilObject2GUI\checkPermissionBool(), ilLinkButton\getInstance(), ilObject2GUI\getType(), object, and ilUtil\sendInfo().

269  {
270  global $ilToolbar, $ilSetting, $tree;
271 
272  if(!$this->checkPermissionBool("write"))
273  {
274  $this->ctrl->redirect($this, "infoScreen");
275  }
276 
277  $this->tabs_gui->activateTab("pages");
278 
279  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
280 
281  $button = ilLinkButton::getInstance();
282  $button->setCaption("prtf_add_page");
283  $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
284  $ilToolbar->addStickyItem($button);
285 
286  if(!$ilSetting->get('disable_wsp_blogs'))
287  {
288  $button = ilLinkButton::getInstance();
289  $button->setCaption("prtf_add_blog");
290  $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
291  $ilToolbar->addStickyItem($button);
292  }
293 
294  $ilToolbar->addSeparator();
295 
296  // #16571
297  if($this->getType() == "prtf")
298  {
299  $button = ilLinkButton::getInstance();
300  $button->setCaption("export_html");
301  $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
302  $ilToolbar->addButtonInstance($button);
303  }
304 
305  include_once "Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
306  $table = new ilPortfolioPageTableGUI($this, "view");
307 
308  // exercise portfolio?
309  include_once "Modules/Portfolio/classes/class.ilPortfolioExerciseGUI.php";
310  $exercises = ilPortfolioExerciseGUI::checkExercise($this->user_id, $this->object->getId(), $table->dataExists());
311  if($exercises)
312  {
313  ilUtil::sendInfo($exercises);
314  }
315 
316  $this->tpl->setContent($table->getHTML());
317  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getType()
Functions that must be overwritten.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false)
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

Field Documentation

◆ $additional

ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $page_id

ilObjPortfolioBaseGUI::$page_id
protected

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

Referenced by copyPage(), and copyPageForm().

◆ $page_mode

ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

ilObjPortfolioBaseGUI::$perma_link
protected

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

◆ $user_id

ilObjPortfolioBaseGUI::$user_id
protected

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

Referenced by preview().


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