ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 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 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 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...
 
 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 (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 ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 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)
 
- 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 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)
 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
 

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

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

References initBlogForm(), and saveBlog().

454  {
455  global $ilHelp;
456 
457  $this->tabs_gui->clearTargets();
458  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
459  $this->ctrl->getLinkTarget($this, "view"));
460 
461  $ilHelp->setScreenIdComponent("prtf");
462  $ilHelp->setScreenId("add_blog");
463 
464  $form = $this->initBlogForm();
465  $this->tpl->setContent($form->getHTML());
466  }
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

References ilObject\_lookupTitle(), getPageGUIClassName(), getPageInstance(), 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  {
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  }
static _lookupTitle($a_id)
lookup object title
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 340 of file class.ilObjPortfolioBaseGUI.php.

References initPageForm().

341  {
342  global $ilHelp;
343 
344  $this->tabs_gui->clearTargets();
345  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
346  $this->ctrl->getLinkTarget($this, "view"));
347 
348  $ilHelp->setScreenIdComponent("prtf");
349  $ilHelp->setScreenId("add_page");
350 
351 
352  $form = $this->initPageForm("create");
353  $this->tpl->setContent($form->getHTML());
354  }
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 504 of file class.ilObjPortfolioBaseGUI.php.

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

505  {
506  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
507  {
508  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
509  $this->ctrl->redirect($this, "view");
510  }
511  else
512  {
513  $this->tabs_gui->activateTab("pages");
514 
515  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
516  $cgui = new ilConfirmationGUI();
517  $cgui->setFormAction($this->ctrl->getFormAction($this));
518  $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
519  $cgui->setCancel($this->lng->txt("cancel"), "view");
520  $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
521 
522  foreach ($_POST["prtf_pages"] as $id)
523  {
524  $page = $this->getPageInstance($id);
525  $title = $page->getTitle();
526  if($page->getType() == ilPortfolioPage::TYPE_BLOG)
527  {
528  $title = $this->lng->txt("obj_blog").": ".ilObject::_lookupTitle((int)$title);
529  }
530  $cgui->addItem("prtf_pages[]", $id, $title);
531  }
532 
533  $this->tpl->setContent($cgui->getHTML());
534  }
535  }
$_POST['username']
Definition: cron.php:12
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)
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

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

851  {
852  $form = $this->initCopyPageForm();
853  if($form->checkInput())
854  {
855  // existing
856  if($form->getInput("target") == "old")
857  {
858  $portfolio_id = $form->getInput("prtf");
859  }
860  // new
861  else
862  {
863  $portfolio = new ilObjPortfolio();
864  $portfolio->setTitle($form->getInput("title"));
865  $portfolio->create();
866  $portfolio_id = $portfolio->getId();
867  }
868 
869  // copy page(s)
870  foreach($_POST["prtf_pages"] as $page_id)
871  {
872  $source = $this->getPageInstance($page_id);
873  $target = $this->getPageInstance(null, $portfolio_id);
874  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
875  $target->setType($source->getType());
876  $target->setTitle($source->getTitle());
877  $target->create();
878  }
879 
880  ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
881  $this->ctrl->redirect($this, "view");
882  }
883 
884  $form->setValuesByPost();
885  $this->copyPageForm($form);
886  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
getPageInstance($a_page_id=null, $a_portfolio_id=null)
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 823 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by copyPage().

824  {
825  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
826  {
827  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
828  $this->ctrl->redirect($this, "view");
829  }
830  else
831  {
832  $this->tabs_gui->activateTab("pages");
833 
834  if(!$a_form)
835  {
836  $a_form = $this->initCopyPageForm();
837  }
838 
839  foreach($_POST["prtf_pages"] as $page_id)
840  {
841  $item = new ilHiddenInputGUI("prtf_pages[]");
842  $item->setValue($page_id);
843  $a_form->addItem($item);
844  }
845 
846  $this->tpl->setContent($a_form->getHTML());
847  }
848  }
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
This class represents a hidden form property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createStyle()

ilObjPortfolioBaseGUI::createStyle ( )

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

1007  {
1008  $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1009  }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

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

541  {
542  if(!$this->checkPermissionBool("write"))
543  {
544  return;
545  }
546 
547  if (is_array($_POST["prtf_pages"]))
548  {
549  foreach ($_POST["prtf_pages"] as $id)
550  {
551  $page = $this->getPageInstance($id);
552  $page->delete();
553  }
554  }
555  ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
556  $this->ctrl->redirect($this, "view");
557  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

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

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

References $_REQUEST, and 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.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editStyle()

ilObjPortfolioBaseGUI::editStyle ( )

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

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

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

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

934  {
935  $this->checkPermission("write");
936 
937  $this->tabs_gui->activateTab("settings");
938  $this->setSettingsSubTabs("style");
939 
940  $form = $this->initStylePropertiesForm();
941  $this->tpl->setContent($form->getHTML());
942  }
checkPermission($a_perm, $a_cmd="")
+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

References ilUtil\deliverFile().

811  {
812  include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
813  $export = new ilPortfolioHTMLExport($this, $this->object);
814  $zip = $export->buildExportFile();
815 
816  ilUtil::deliverFile($zip, $this->object->getTitle().".zip", '', false, true);
817  }
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.
+ 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 220 of file class.ilObjPortfolioBaseGUI.php.

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

◆ 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(), 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)
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 890 of file class.ilObjPortfolioBaseGUI.php.

References initCopyPageFormOptions(), and ilFormPropertyGUI\setRequired().

Referenced by copyPage(), and copyPageForm().

891  {
892  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
893  $form = new ilPropertyFormGUI();
894  $form->setFormAction($this->ctrl->getFormAction($this));
895  $form->setTitle($this->lng->txt("prtf_copy_page"));
896 
897  $tgt = new ilRadioGroupInputGUI($this->lng->txt("target"), "target");
898  $tgt->setRequired(true);
899  $form->addItem($tgt);
900 
901  $this->initCopyPageFormOptions($tgt);
902 
903  $form->addCommandButton("copyPage", $this->lng->txt("save"));
904  $form->addCommandButton("view", $this->lng->txt("cancel"));
905 
906  return $form;
907  }
This class represents a property form user interface.
initCopyPageFormOptions(ilFormPropertyGUI $a_tgt)
This class represents a property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilFormPropertyGUI  $a_tgt)
abstractprotected

Referenced by copyPage(), and initCopyPageForm().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

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

Referenced by ilObjPortfolioGUI\initEditForm().

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

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

Referenced by addPage(), and savePage().

363  {
364  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
365  $form = new ilPropertyFormGUI();
366  $form->setFormAction($this->ctrl->getFormAction($this));
367 
368  // title
369  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
370  $ti->setMaxLength(200);
371  $ti->setRequired(true);
372  $form->addItem($ti);
373 
374  // save and cancel commands
375  if ($a_mode == "create")
376  {
377  include_once "Services/Style/classes/class.ilPageLayout.php";
379  if($templates)
380  {
381  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
382  $use_template->setRequired(true);
383  $form->addItem($use_template);
384 
385  $opt = new ilRadioOption($this->lng->txt("none"), 0);
386  $use_template->addOption($opt);
387 
388  foreach ($templates as $templ)
389  {
390  $templ->readObject();
391 
392  $opt = new ilRadioOption($templ->getTitle().$templ->getPreview(), $templ->getId());
393  $use_template->addOption($opt);
394  }
395  }
396 
397  $form->setTitle($this->lng->txt("prtf_add_page").": ".
398  $this->object->getTitle());
399  $form->addCommandButton("savePage", $this->lng->txt("save"));
400  $form->addCommandButton("view", $this->lng->txt("cancel"));
401  }
402  else
403  {
404  /* edit is done directly in table gui
405  $form->setTitle($this->lng->txt("prtf_edit_page"));
406  $form->addCommandButton("updatePage", $this->lng->txt("save"));
407  $form->addCommandButton("view", $this->lng->txt("cancel"));
408  */
409  }
410 
411  return $form;
412  }
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 944 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by editStyleProperties().

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

References $_GET, $_REQUEST, $ilSetting, ilObject2GUI\$parent_id, ilObject2GUI\$tree, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), ilObject2GUI\checkPermissionBool(), ilPortfolioPage\getAllPages(), getPageGUIInstance(), ilObject2GUI\getType(), ilMainMenuGUI\MODE_TOPBAR_ONLY, setContentStyleSheet(), and ilPortfolioPage\TYPE_BLOG.

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

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

References $t, ilObjUser\_getPersonalPicturePath(), and ilObjUser\_lookupName().

Referenced by ilPortfolioHTMLExport\buildExportTemplate().

766  {
767  $name = ilObjUser::_lookupName($a_user_id);
768  $name = $name["lastname"].", ".($t = $name["title"] ? $t . " " : "").$name["firstname"];
769 
770  // show banner?
771  $banner = $banner_width = $banner_height = false;
772  $prfa_set = new ilSetting("prfa");
773  if($prfa_set->get("banner"))
774  {
775  $banner = $a_portfolio->getImageFullPath();
776  $banner_width = $prfa_set->get("banner_width");
777  $banner_height = $prfa_set->get("banner_height");
778  if($a_export)
779  {
780  $banner = basename($banner);
781  }
782  }
783 
784  // profile picture
785  $ppic = null;
786  if($a_portfolio->hasProfilePicture())
787  {
788  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
789  if($a_export)
790  {
791  $ppic = basename($ppic);
792  }
793  }
794 
795  $a_tpl->resetHeaderBlock(false);
796  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
797  $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
798  $a_tpl->setTitleIcon($ppic);
799  $a_tpl->setTitle($a_portfolio->getTitle());
800  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
801  $a_tpl->setDescription($name);
802 
803  // to get rid of locator in portfolio template preview
804  $a_tpl->setVariable("LOCATOR", "");
805 
806  // :TODO: obsolete?
807  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
808  }
static _lookupName($a_user_id)
lookup user name
ILIAS Setting Class.
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 417 of file class.ilObjPortfolioBaseGUI.php.

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

418  {
419  $form = $this->initPageForm("create");
420  if ($form->checkInput() && $this->checkPermissionBool("write"))
421  {
422  include_once("Modules/Portfolio/classes/class.ilPortfolioPage.php");
423  $page = $this->getPageInstance();
424  $page->setType(ilPortfolioPage::TYPE_PAGE);
425  $page->setTitle($form->getInput("title"));
426 
427  // use template as basis
428  $layout_id = $form->getInput("tmpl");
429  if($layout_id)
430  {
431  include_once("./Services/Style/classes/class.ilPageLayout.php");
432  $layout_obj = new ilPageLayout($layout_id);
433  $page->setXMLContent($layout_obj->getXMLContent());
434  }
435 
436  $page->create();
437 
438  ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
439  $this->ctrl->redirect($this, "view");
440  }
441 
442  $this->tabs_gui->clearTargets();
443  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
444  $this->ctrl->getLinkTarget($this, "view"));
445 
446  $form->setValuesByPost();
447  $this->tpl->setContent($form->getHtml());
448  }
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 475 of file class.ilObjPortfolioBaseGUI.php.

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

476  {
477  if(!$this->checkPermissionBool("write"))
478  {
479  return;
480  }
481 
482  if (is_array($_POST["order"]))
483  {
484  foreach ($_POST["order"] as $k => $v)
485  {
486  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
487  if($_POST["title"][$k])
488  {
489  $page->setTitle(ilUtil::stripSlashes($_POST["title"][$k]));
490  }
491  $page->setOrderNr(ilUtil::stripSlashes($v));
492  $page->update();
493  }
494  ilPortfolioPage::fixOrdering($this->object->getId());
495  }
496 
497  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
498  $this->ctrl->redirect($this, "view");
499  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
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
getPageInstance($a_page_id=null, $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjPortfolioBaseGUI::saveStyleSettings ( )

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

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

1022  {
1023  global $ilSetting;
1024 
1025  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1026  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1027  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1028  || $this->object->getStyleSheetId() == 0))
1029  {
1030  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1031  $this->object->update();
1032 
1033  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1034  }
1035  $this->ctrl->redirect($this, "editStyleProperties");
1036  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
_lookupStandard($a_id)
Lookup standard flag.
global $ilSetting
Definition: privfeed.php:40
+ 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 914 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by handlePageCall(), and preview().

915  {
916  global $tpl;
917 
918  if ($a_tpl != null)
919  {
920  $ctpl = $a_tpl;
921  }
922  else
923  {
924  $ctpl = $tpl;
925  }
926 
927  $ctpl->setCurrentBlock("ContentStyle");
928  $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
929  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
930  $ctpl->parseCurrentBlock();
931  }
getContentStylePath($a_style_id)
get content style path
+ 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.

Referenced by editStyleProperties(), and initEditCustomForm().

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

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $a_form)

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

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

231  {
232  $this->object->setPublicComments($a_form->getInput("comments"));
233  $this->object->setProfilePicture($a_form->getInput("ppic"));
234  /*
235  $this->object->setBackgroundColor($a_form->getInput("bg_color"));
236  $this->object->setFontcolor($a_form->getInput("font_color"));
237  */
238 
239  $prfa_set = new ilSetting("prfa");
240 
241  if($_FILES["banner"]["tmp_name"])
242  {
243  $this->object->uploadImage($_FILES["banner"]);
244  }
245  else if($prfa_set->get('banner') and $a_form->getItemByPostVar("banner")->getDeletionFlag())
246  {
247  $this->object->deleteImage();
248  }
249  }
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 265 of file class.ilObjPortfolioBaseGUI.php.

References $ilSetting, ilObjectGUI\$ref_id, ilObject2GUI\$tree, ilObject\_getAllReferences(), ilObject2GUI\checkPermissionBool(), ilObjExercise\findUserFiles(), ilLinkButton\getInstance(), and ilUtil\sendInfo().

266  {
267  global $ilToolbar, $ilSetting, $tree;
268 
269  if(!$this->checkPermissionBool("write"))
270  {
271  $this->ctrl->redirect($this, "infoScreen");
272  }
273 
274  $this->tabs_gui->activateTab("pages");
275 
276  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
277 
278  $button = ilLinkButton::getInstance();
279  $button->setCaption("prtf_add_page");
280  $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
281  $ilToolbar->addButtonInstance($button);
282 
283  if(!$ilSetting->get('disable_wsp_blogs'))
284  {
285  $button = ilLinkButton::getInstance();
286  $button->setCaption("prtf_add_blog");
287  $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
288  $ilToolbar->addButtonInstance($button);
289  }
290 
291  $ilToolbar->addSeparator();
292 
293  $button = ilLinkButton::getInstance();
294  $button->setCaption("export_html");
295  $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
296  $ilToolbar->addButtonInstance($button);
297 
298  include_once "Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
299  $table = new ilPortfolioPageTableGUI($this, "view");
300 
301  // exercise portfolio?
302  include_once "Modules/Exercise/classes/class.ilObjExercise.php";
303  $exercises = ilObjExercise::findUserFiles($this->user_id, $this->object->getId());
304  if($exercises)
305  {
306  $info = array();
307  foreach($exercises as $exercise)
308  {
309  // #9988
310  $active_ref = false;
311  foreach(ilObject::_getAllReferences($exercise["obj_id"]) as $ref_id)
312  {
313  if(!$tree->isSaved($ref_id))
314  {
315  $active_ref = true;
316  break;
317  }
318  }
319  if($active_ref)
320  {
321  $part = $this->getExerciseInfo($exercise["ass_id"], $table->dataExists());
322  if($part)
323  {
324  $info[] = $part;
325  }
326  }
327  }
328  if(sizeof($info))
329  {
330  ilUtil::sendInfo(implode("<br />", $info));
331  }
332  }
333 
334  $this->tpl->setContent($table->getHTML());
335  }
static findUserFiles($a_user_id, $a_filetitle)
Check if given file was assigned.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static _getAllReferences($a_id)
get all reference ids of object
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilSetting
Definition: privfeed.php:40
+ 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

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