ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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...
 
 isVisible ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 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 ()
 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 (ilFormPropertyGUI $a_tgt)
 
- 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...
 
 prepareOutput ()
 prepare output 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 ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ()
 
 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 ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 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)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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
 

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 
)

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Reimplemented from ilObject2GUI.

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

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 }
global $ilUser
Definition: imgupload.php:15

References $ilUser.

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

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 }

References initBlogForm().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

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

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 {
52 $title = ilObject::_lookupTitle($title);
53 }
54 $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
55 $ilLocator->addItem($title,
56 $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit"));
57 }
58 }
getPageInstance($a_page_id=null, $a_portfolio_id=null)
static _lookupTitle($a_id)
lookup object title

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

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.

References initPageForm().

+ Here is the call graph for this function:

◆ confirmPortfolioPageDeletion()

ilObjPortfolioBaseGUI::confirmPortfolioPageDeletion ( )

Confirm portfolio deletion.

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

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 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_POST['username']
Definition: cron.php:12

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

+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

856 {
857 $form = $this->initCopyPageForm();
858 if($form->checkInput())
859 {
860 // existing
861 if($form->getInput("target") == "old")
862 {
863 $portfolio_id = $form->getInput("prtf");
864 }
865 // new
866 else
867 {
868 $portfolio = new ilObjPortfolio();
869 $portfolio->setTitle($form->getInput("title"));
870 $portfolio->create();
871 $portfolio_id = $portfolio->getId();
872 }
873
874 // copy page(s)
875 foreach($_POST["prtf_pages"] as $page_id)
876 {
877 $source = $this->getPageInstance($page_id);
878 $target = $this->getPageInstance(null, $portfolio_id);
879 $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
880 $target->setType($source->getType());
881 $target->setTitle($source->getTitle());
882 $target->create();
883 }
884
885 ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
886 $this->ctrl->redirect($this, "view");
887 }
888
889 $form->setValuesByPost();
890 $this->copyPageForm($form);
891 }
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

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

+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm (   $a_form = null)

Select target portfolio for page(s) copy.

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

829 {
830 if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
831 {
832 ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
833 $this->ctrl->redirect($this, "view");
834 }
835 else
836 {
837 $this->tabs_gui->activateTab("pages");
838
839 if(!$a_form)
840 {
841 $a_form = $this->initCopyPageForm();
842 }
843
844 foreach($_POST["prtf_pages"] as $page_id)
845 {
846 $item = new ilHiddenInputGUI("prtf_pages[]");
847 $item->setValue($page_id);
848 $a_form->addItem($item);
849 }
850
851 $this->tpl->setContent($a_form->getHTML());
852 }
853 }
This class represents a hidden form property in a property form.

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

1012 {
1013 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1014 }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

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 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.

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

+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

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

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

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 }
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

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

1017 {
1018 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1019 }

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

939 {
940 $this->checkPermission("write");
941
942 $this->tabs_gui->activateTab("settings");
943 $this->setSettingsSubTabs("style");
944
945 $form = $this->initStylePropertiesForm();
946 $this->tpl->setContent($form->getHTML());
947 }
checkPermission($a_perm, $a_cmd="")

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

+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

816 {
817 include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
818 $export = new ilPortfolioHTMLExport($this, $this->object);
819 $zip = $export->buildExportFile();
820
821 ilUtil::deliverFile($zip, $this->object->getTitle().".zip", '', false, true);
822 }
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 144 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 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

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

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
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 }
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.

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

896 {
897 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
898 $form = new ilPropertyFormGUI();
899 $form->setFormAction($this->ctrl->getFormAction($this));
900 $form->setTitle($this->lng->txt("prtf_copy_page"));
901
902 $tgt = new ilRadioGroupInputGUI($this->lng->txt("target"), "target");
903 $tgt->setRequired(true);
904 $form->addItem($tgt);
905
906 $this->initCopyPageFormOptions($tgt);
907
908 $form->addCommandButton("copyPage", $this->lng->txt("save"));
909 $form->addCommandButton("view", $this->lng->txt("cancel"));
910
911 return $form;
912 }
initCopyPageFormOptions(ilFormPropertyGUI $a_tgt)
This class represents a property form user interface.
This class represents a property in a property form.

References initCopyPageFormOptions().

Referenced by copyPage(), and copyPageForm().

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

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilFormPropertyGUI  $a_tgt)
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 182 of file class.ilObjPortfolioBaseGUI.php.

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 }
print $file
This class represents a checkbox property in a property form.
setPersonalWorkspaceQuotaCheck($a_value)
This class represents an image file property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
ILIAS Setting Class.

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

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/Style/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 }
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
This class represents an option in a radio group.
This class represents a text property in a property form.

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

Referenced by addPage(), and savePage().

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

◆ initStylePropertiesForm()

ilObjPortfolioBaseGUI::initStylePropertiesForm ( )

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

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

References $_GET, $ilSetting, 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 544 of file class.ilObjPortfolioBaseGUI.php.

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::getAllPages($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 }
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 getAllPages($a_portfolio_id)
Get pages of portfolio.

References $_GET, $_REQUEST, $ilSetting, $ilUser, ilObject2GUI\$parent_id, ilObject2GUI\$tree, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), ilObject2GUI\checkPermissionBool(), ilPortfolioPage\getAllPages(), 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 769 of file class.ilObjPortfolioBaseGUI.php.

770 {
771 $name = ilObjUser::_lookupName($a_user_id);
772 $name = $name["lastname"].", ".($t = $name["title"] ? $t . " " : "").$name["firstname"];
773
774 // show banner?
775 $banner = $banner_width = $banner_height = false;
776 $prfa_set = new ilSetting("prfa");
777 if($prfa_set->get("banner"))
778 {
779 require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
780 $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
781 $banner_width = $prfa_set->get("banner_width");
782 $banner_height = $prfa_set->get("banner_height");
783 if($a_export)
784 {
785 $banner = basename($banner);
786 }
787 }
788
789 // profile picture
790 $ppic = null;
791 if($a_portfolio->hasProfilePicture())
792 {
793 $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
794 if($a_export)
795 {
796 $ppic = basename($ppic);
797 }
798 }
799
800 $a_tpl->resetHeaderBlock(false);
801 // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
802 $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
803 $a_tpl->setTitleIcon($ppic);
804 $a_tpl->setTitle($a_portfolio->getTitle());
805 // $a_tpl->setTitleColor($a_portfolio->getFontColor());
806 $a_tpl->setDescription($name);
807
808 // to get rid of locator in portfolio template preview
809 $a_tpl->setVariable("LOCATOR", "");
810
811 // :TODO: obsolete?
812 // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
813 }
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
static _lookupName($a_user_id)
lookup user name
static signFile($path_to_file)

References $t, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupName(), 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 399 of file class.ilObjPortfolioBaseGUI.php.

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/Style/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 }
Class ilPageLayout.

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

+ 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.

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 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(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjPortfolioBaseGUI::saveStyleSettings ( )

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

1027 {
1028 global $ilSetting;
1029
1030 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1031 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1032 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1033 || $this->object->getStyleSheetId() == 0))
1034 {
1035 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1036 $this->object->update();
1037
1038 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1039 }
1040 $this->ctrl->redirect($this, "editStyleProperties");
1041 }

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), ilUtil\sendSuccess(), 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 134 of file class.ilObjPortfolioBaseGUI.php.

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

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet (   $a_tpl = null)

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

920 {
921 global $tpl;
922
923 if ($a_tpl != null)
924 {
925 $ctpl = $a_tpl;
926 }
927 else
928 {
929 $ctpl = $tpl;
930 }
931
932 $ctpl->setCurrentBlock("ContentStyle");
933 $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
934 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
935 $ctpl->parseCurrentBlock();
936 }
getContentStylePath($a_style_id)
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 155 of file class.ilObjPortfolioBaseGUI.php.

156 {
157 $this->perma_link = array("obj_id"=>$a_obj_id, "type"=>$a_type);
158 }

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

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 }

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

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

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 }
static getInstance()
Factory.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false)

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

+ 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: