ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjPortfolioBaseGUI Class Reference

Portfolio view gui base class. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 setAdditional ($a_additional)
 Set Additonal Information (used in public profile?) More...
 
 getAdditional ()
 Get Additonal Information. More...
 
 setPermaLink ($a_obj_id, $a_type)
 Set custom perma link (used in public profile?) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 
 getPageGUIClassName ()
 
 view ()
 Show list of portfolio pages. More...
 
 initPageForm ($a_mode="create")
 Init portfolio page form. More...
 
 savePage ()
 Create new portfolio page. More...
 
 savePortfolioPagesOrdering ()
 Save ordering of portfolio pages. More...
 
 confirmPortfolioPageDeletion ()
 Confirm portfolio deletion. More...
 
 deletePortfolioPages ()
 Delete portfolio pages. More...
 
 preview ($a_return=false, $a_content=false, $a_show_notes=true)
 Show user page. More...
 
 export ()
 
 copyPageForm ($a_form=null)
 Select target portfolio for page(s) copy. More...
 
 copyPage ()
 
 initCopyPageForm ()
 
 setContentStyleSheet ($a_tpl=null)
 
 editStyleProperties ()
 
 initStylePropertiesForm ()
 
 createStyle ()
 
 editStyle ()
 
 deleteStyle ()
 
 saveStyleSettings ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

 $help
 
 $main_menu
 
 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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 34 of file class.ilObjPortfolioBaseGUI.php.

References $DIC, $ilUser, settings(), and user().

35  {
36  global $DIC;
37 
38  $this->user = $DIC->user();
39  $this->locator = $DIC["ilLocator"];
40  $this->toolbar = $DIC->toolbar();
41  $this->settings = $DIC->settings();
42  $this->tree = $DIC->repositoryTree();
43  $this->help = $DIC["ilHelp"];
44  $this->main_menu = $DIC["ilMainMenu"];
45  $this->tpl = $DIC["tpl"];
46  $ilUser = $DIC->user();
47 
48  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
49 
50  $this->user_id = $ilUser->getId();
51 
52  $this->lng->loadLanguageModule("prtf");
53  $this->lng->loadLanguageModule("user");
54  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
$ilUser
Definition: imgupload.php:18
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ addBlog()

ilObjPortfolioBaseGUI::addBlog ( )
protected

Show portfolio blog page creation form.

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

References $form, $help, initBlogForm(), and saveBlog().

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

◆ addLocatorItems()

ilObjPortfolioBaseGUI::addLocatorItems ( )
protected

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

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

57  {
58  $ilLocator = $this->locator;
59 
60  if ($this->object) {
61  $ilLocator->addItem(
62  strip_tags($this->object->getTitle()),
63  $this->ctrl->getLinkTarget($this, "view")
64  );
65  }
66 
67  if ($this->page_id) {
68  $page = $this->getPageInstance($this->page_id);
69  $title = $page->getTitle();
70  if ($page->getType() == ilPortfolioPage::TYPE_BLOG) {
72  }
73  $this->ctrl->setParameterByClass($this->getPageGUIClassName(), "ppage", $this->page_id);
74  $ilLocator->addItem(
75  $title,
76  $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), "edit")
77  );
78  }
79  }
static _lookupTitle($a_id)
lookup object title
Create new PHPExcel object
obj_idprivate
getPageInstance($a_page_id=null, $a_portfolio_id=null)
+ Here is the call graph for this function:

◆ addPage()

ilObjPortfolioBaseGUI::addPage ( )
protected

Show portfolio page creation form.

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

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

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

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

508  {
509  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0) {
510  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
511  $this->ctrl->redirect($this, "view");
512  } else {
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  $page = $this->getPageInstance($id);
524  $title = $page->getTitle();
525  if ($page->getType() == ilPortfolioPage::TYPE_BLOG) {
526  $title = $this->lng->txt("obj_blog") . ": " . ilObject::_lookupTitle((int) $title);
527  }
528  $cgui->addItem("prtf_pages[]", $id, $title);
529  }
530 
531  $this->tpl->setContent($cgui->getHTML());
532  }
533  }
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyPage()

ilObjPortfolioBaseGUI::copyPage ( )

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

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

841  {
842  $form = $this->initCopyPageForm();
843  if ($form->checkInput()) {
844  // existing
845  if ($form->getInput("target") == "old") {
846  $portfolio_id = $form->getInput("prtf");
847  }
848  // new
849  else {
850  $portfolio = new ilObjPortfolio();
851  $portfolio->setTitle($form->getInput("title"));
852  $portfolio->create();
853  $portfolio_id = $portfolio->getId();
854  }
855 
856  // copy page(s)
857  foreach ($_POST["prtf_pages"] as $page_id) {
858  $source = $this->getPageInstance($page_id);
859  $target = $this->getPageInstance(null, $portfolio_id);
860  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
861  $target->setType($source->getType());
862  $target->setTitle($source->getTitle());
863  $target->create();
864  }
865 
866  ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
867  $this->ctrl->redirect($this, "view");
868  }
869 
870  $form->setValuesByPost();
871  $this->copyPageForm($form);
872  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_POST['submit'])) $form
$source
Definition: linkback.php:22
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
+ Here is the call graph for this function:

◆ copyPageForm()

ilObjPortfolioBaseGUI::copyPageForm (   $a_form = null)

Select target portfolio for page(s) copy.

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

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

Referenced by copyPage().

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

◆ createStyle()

ilObjPortfolioBaseGUI::createStyle ( )

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

987  {
988  $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
989  }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

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

539  {
540  if (!$this->checkPermissionBool("write")) {
541  return;
542  }
543 
544  if (is_array($_POST["prtf_pages"])) {
545  foreach ($_POST["prtf_pages"] as $id) {
546  $page = $this->getPageInstance($id);
547  $page->delete();
548  }
549  }
550  ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
551  $this->ctrl->redirect($this, "view");
552  }
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.
if(!array_key_exists('StateId', $_REQUEST)) $id
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteStyle()

ilObjPortfolioBaseGUI::deleteStyle ( )

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

997  {
998  $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
999  }

◆ determinePageCall()

ilObjPortfolioBaseGUI::determinePageCall ( )
protected

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

References ilObject2GUI\checkPermissionBool().

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

82  {
83  // edit
84  if (isset($_REQUEST["ppage"])) {
85  if (!$this->checkPermissionBool("write")) {
86  $this->ctrl->redirect($this, "view");
87  }
88 
89  $this->page_id = $_REQUEST["ppage"];
90  $this->page_mode = "edit";
91  $this->ctrl->setParameter($this, "ppage", $this->page_id);
92  return true;
93  }
94  // preview
95  else {
96  $this->page_id = $_REQUEST["user_page"];
97  $this->page_mode = "preview";
98  $this->ctrl->setParameter($this, "user_page", $this->page_id);
99  return false;
100  }
101  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editStyle()

ilObjPortfolioBaseGUI::editStyle ( )

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

992  {
993  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
994  }

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

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

915  {
916  $this->checkPermission("write");
917 
918  $this->tabs_gui->activateTab("settings");
919  $this->setSettingsSubTabs("style");
920 
921  $form = $this->initStylePropertiesForm();
922  $this->tpl->setContent($form->getHTML());
923  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

References ilUtil\deliverFile(), and object.

806  {
807  include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
808  $export = new ilPortfolioHTMLExport($this, $this->object);
809  $zip = $export->buildExportFile();
810 
811  ilUtil::deliverFile($zip, $this->object->getTitle() . ".zip", '', false, true);
812  }
Portfolio HTML exporter class.
Create new PHPExcel object
obj_idprivate
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 159 of file class.ilObjPortfolioBaseGUI.php.

References $additional.

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

+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioBaseGUI::getEditFormCustomValues ( array $a_values)
protected

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

241  {
242  $a_values["comments"] = $this->object->hasPublicComments();
243  $a_values["ppic"] = $this->object->hasProfilePicture();
244  /*
245  $a_values["bg_color"] = $this->object->getBackgroundColor();
246  $a_values["font_color"] = $this->object->getFontColor();
247  */
248  }

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

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

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

104  {
105  $this->tabs_gui->clearTargets();
106  $this->tabs_gui->setBackTarget(
107  $this->lng->txt("back"),
108  $this->ctrl->getLinkTarget($this, "view")
109  );
110 
111  if (!$this->page_id) {
112  $this->ctrl->redirect($this, "view");
113  }
114 
115  $page_gui = $this->getPageGUIInstance($this->page_id);
116 
117  // needed for editor
118  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
119  $this->object->getStyleSheetId(),
120  $this->getType()
121  ));
122 
123  $ret = $this->ctrl->forwardCommand($page_gui);
124 
125  if ($ret != "" && $ret !== true) {
126  // preview (fullscreen)
127  if ($this->page_mode == "preview") {
128  // embedded call which did not generate any output (e.g. calendar month navigation)
130  // suppress (portfolio) notes for blog postings
131  $this->preview(false, $ret, ($a_cmd != "previewEmbedded"));
132  } else {
133  $this->preview(false);
134  }
135  }
136  // edit
137  else {
138  $this->setContentStyleSheet();
139  $this->tpl->setContent($ret);
140  }
141  }
142  }
getType()
Functions that must be overwritten.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getPageGUIInstance($a_page_id)
Create new PHPExcel object
obj_idprivate
$ret
Definition: parser.php:6
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initBlogForm()

ilObjPortfolioBaseGUI::initBlogForm ( )
abstractprotected

Referenced by addBlog().

+ Here is the caller graph for this function:

◆ initCopyPageForm()

ilObjPortfolioBaseGUI::initCopyPageForm ( )

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

References $form, and initCopyPageFormOptions().

Referenced by copyPage(), and copyPageForm().

877  {
878  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
879  $form = new ilPropertyFormGUI();
880  $form->setFormAction($this->ctrl->getFormAction($this));
881  $form->setTitle($this->lng->txt("prtf_copy_page"));
882 
884 
885  $form->addCommandButton("copyPage", $this->lng->txt("save"));
886  $form->addCommandButton("view", $this->lng->txt("cancel"));
887 
888  return $form;
889  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioBaseGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
abstractprotected

Referenced by copyPage(), and initCopyPageForm().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjPortfolioBaseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

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

Referenced by ilObjPortfolioGUI\initEditForm().

202  {
203  $this->setSettingsSubTabs("properties");
204 
205  // comments
206  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
207  $a_form->addItem($comments);
208 
209  // profile picture
210  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
211  $a_form->addItem($ppic);
212 
213  $prfa_set = new ilSetting("prfa");
214  if ($prfa_set->get("banner")) {
215  include_once "Services/Form/classes/class.ilFileInputGUI.php";
217 
218  $dimensions = " (" . $prfa_set->get("banner_width") . "x" .
219  $prfa_set->get("banner_height") . ")";
220 
221  $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner") . $dimensions, "banner");
222  $a_form->addItem($img);
223 
224  // show existing file
225  $file = $this->object->getImageFullPath(true);
226  if ($file) {
227  $img->setImage($file);
228  }
229  }
230 
231  /* #15000
232  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
233  $a_form->addItem($bg_color);
234 
235  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
236  $a_form->addItem($font_color);
237  */
238  }
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
static setPersonalWorkspaceQuotaCheck($a_value)
This class represents an image file property in a property form.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPageForm()

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

Init portfolio page form.

Parameters
string$a_mode
Returns
ilPropertyFormGUI

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

References $form, ilPageLayout\activeLayouts(), ilPageLayout\MODULE_PORTFOLIO, ilTextInputGUI\setMaxLength(), and ilFormPropertyGUI\setRequired().

Referenced by addPage(), and savePage().

365  {
366  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
367  $form = new ilPropertyFormGUI();
368  $form->setFormAction($this->ctrl->getFormAction($this));
369 
370  // title
371  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
372  $ti->setMaxLength(200);
373  $ti->setRequired(true);
374  $form->addItem($ti);
375 
376  // save and cancel commands
377  if ($a_mode == "create") {
378  include_once "Services/COPage/Layout/classes/class.ilPageLayout.php";
380  if ($templates) {
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  $templ->readObject();
390 
391  $opt = new ilRadioOption($templ->getTitle() . $templ->getPreview(), $templ->getId());
392  $use_template->addOption($opt);
393  }
394  }
395 
396  $form->setTitle($this->lng->txt("prtf_add_page") . ": " .
397  $this->object->getTitle());
398  $form->addCommandButton("savePage", $this->lng->txt("save"));
399  $form->addCommandButton("view", $this->lng->txt("cancel"));
400  } else {
401  /* edit is done directly in table gui
402  $form->setTitle($this->lng->txt("prtf_edit_page"));
403  $form->addCommandButton("updatePage", $this->lng->txt("save"));
404  $form->addCommandButton("view", $this->lng->txt("cancel"));
405  */
406  }
407 
408  return $form;
409  }
This class represents an option in a radio group.
This class represents a property form user interface.
This class represents a property in a property form.
if(isset($_POST['submit'])) $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 925 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by editStyleProperties().

926  {
928 
929  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
930  $this->lng->loadLanguageModule("style");
931 
932  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
933  $form = new ilPropertyFormGUI();
934 
935  $fixed_style = $ilSetting->get("fixed_content_style_id");
936  $style_id = $this->object->getStyleSheetId();
937 
938  if ($fixed_style > 0) {
939  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
940  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
941  $this->lng->txt("global_fixed") . ")");
942  $form->addItem($st);
943  } else {
945  true,
946  false,
947  $_GET["ref_id"]
948  );
949 
950  $st_styles[0] = $this->lng->txt("default");
951  ksort($st_styles);
952 
953  if ($style_id > 0) {
954  // individual style
955  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
956  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
957  $st->setValue(ilObject::_lookupTitle($style_id));
958  $form->addItem($st);
959 
960  // delete command
961  $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
962  $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
963  }
964  }
965 
966  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
967  $style_sel = new ilSelectInputGUI(
968  $this->lng->txt("style_current_style"),
969  "style_id"
970  );
971  $style_sel->setOptions($st_styles);
972  $style_sel->setValue($style_id);
973  $form->addItem($style_sel);
974 
975  $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
976  $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
977  }
978  }
979 
980  $form->setTitle($this->lng->txt($this->getType() . "_style"));
981  $form->setFormAction($this->ctrl->getFormAction($this));
982 
983  return $form;
984  }
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
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
if(isset($_POST['submit'])) $form
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preview()

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

Show user page.

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

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

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

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

◆ renderFullscreenHeader()

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

Render banner, user name.

Parameters
object$a_tpl
int$a_user_id
bool$a_export_path

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

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

Referenced by ilPortfolioHTMLExport\buildExportTemplate().

748  {
749  global $DIC;
750 
751  $ilUser = $DIC->user();
752 
753  if (!$a_export) {
754  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
756  $a_portfolio->getType(),
757  ($a_portfolio->getType() == "prtt")
758  ? $a_portfolio->getRefId()
759  : $a_portfolio->getId(),
760  $a_portfolio->getId(),
761  $ilUser->getId()
762  );
763  }
764 
765  $name = ilObjUser::_lookupName($a_user_id);
766  $name = $name["lastname"] . ", " . ($t = $name["title"] ? $t . " " : "") . $name["firstname"];
767 
768  // show banner?
769  $banner = $banner_width = $banner_height = false;
770  $prfa_set = new ilSetting("prfa");
771  if ($prfa_set->get("banner")) {
772  require_once('./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
773  $banner = ilWACSignedPath::signFile($a_portfolio->getImageFullPath());
774  $banner_width = $prfa_set->get("banner_width");
775  $banner_height = $prfa_set->get("banner_height");
776  if ($a_export) {
777  $banner = basename($banner);
778  }
779  }
780 
781  // profile picture
782  $ppic = null;
783  if ($a_portfolio->hasProfilePicture()) {
784  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
785  if ($a_export) {
786  $ppic = basename($ppic);
787  }
788  }
789 
790  $a_tpl->resetHeaderBlock(false);
791  // $a_tpl->setBackgroundColor($a_portfolio->getBackgroundColor());
792  $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
793  $a_tpl->setTitleIcon($ppic);
794  $a_tpl->setTitle($a_portfolio->getTitle());
795  // $a_tpl->setTitleColor($a_portfolio->getFontColor());
796  $a_tpl->setDescription($name);
797 
798  // to get rid of locator in portfolio template preview
799  $a_tpl->setVariable("LOCATOR", "");
800 
801  // :TODO: obsolete?
802  // $a_tpl->setBodyClass("std ilExternal ilPortfolio");
803  }
static _lookupName($a_user_id)
lookup user name
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
global $DIC
Definition: saml.php:7
if($format !==null) $name
Definition: metadata.php:146
$ilUser
Definition: imgupload.php:18
static signFile($path_to_file)
+ 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 414 of file class.ilObjPortfolioBaseGUI.php.

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

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

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

475  {
476  if (!$this->checkPermissionBool("write")) {
477  return;
478  }
479 
480  $title_changes = array();
481 
482  if (is_array($_POST["order"])) {
483  foreach ($_POST["order"] as $k => $v) {
484  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
485  if ($_POST["title"][$k]) {
486  $new_title = trim(ilUtil::stripSlashes($_POST["title"][$k]));
487  if ($page->getTitle() != $new_title) {
488  $title_changes[$page->getId()] = array("old" => $page->getTitle(), "new" => $new_title);
489  $page->setTitle($new_title);
490  }
491  }
492  $page->setOrderNr(ilUtil::stripSlashes($v));
493  $page->update();
494  }
495  ilPortfolioPage::fixOrdering($this->object->getId());
496  }
497 
498  $this->object->fixLinksOnTitleChange($title_changes);
499 
500  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
501  $this->ctrl->redirect($this, "view");
502  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static fixOrdering($a_portfolio_id)
Fix ordering.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
getPageInstance($a_page_id=null, $a_portfolio_id=null)
$_POST["username"]
+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjPortfolioBaseGUI::saveStyleSettings ( )

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

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

1002  {
1004 
1005  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1006  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1007  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1008  || $this->object->getStyleSheetId() == 0)) {
1009  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1010  $this->object->update();
1011 
1012  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1013  }
1014  $this->ctrl->redirect($this, "editStyleProperties");
1015  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ setAdditional()

ilObjPortfolioBaseGUI::setAdditional (   $a_additional)

Set Additonal Information (used in public profile?)

Parameters
array$a_additionalAdditonal Information

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

150  {
151  $this->additional = $a_additional;
152  }

◆ setContentStyleSheet()

ilObjPortfolioBaseGUI::setContentStyleSheet (   $a_tpl = null)

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

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

Referenced by handlePageCall(), and preview().

897  {
898  $tpl = $this->tpl;
899 
900  if ($a_tpl != null) {
901  $ctpl = $a_tpl;
902  } else {
903  $ctpl = $tpl;
904  }
905 
906  $ctpl->setCurrentBlock("ContentStyle");
907  $ctpl->setVariable(
908  "LOCATION_CONTENT_STYLESHEET",
909  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
910  );
911  $ctpl->parseCurrentBlock();
912  }
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPermaLink()

ilObjPortfolioBaseGUI::setPermaLink (   $a_obj_id,
  $a_type 
)

Set custom perma link (used in public profile?)

Parameters
int$a_obj_id
string$a_type

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

References $a_type, and array.

171  {
172  $this->perma_link = array("obj_id"=>$a_obj_id, "type"=>$a_type);
173  }
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

References ilObject2GUI\getType().

Referenced by editStyleProperties(), and initEditCustomForm().

181  {
182  // #17455
183  $this->lng->loadLanguageModule($this->getType());
184 
185  // general properties
186  $this->tabs_gui->addSubTab(
187  "properties",
188  $this->lng->txt($this->getType() . "_properties"),
189  $this->ctrl->getLinkTarget($this, 'edit')
190  );
191 
192  $this->tabs_gui->addSubTab(
193  "style",
194  $this->lng->txt("obj_sty"),
195  $this->ctrl->getLinkTarget($this, 'editStyleProperties')
196  );
197 
198  $this->tabs_gui->activateSubTab($a_active);
199  }
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $a_form)

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

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

251  {
252  $this->object->setPublicComments($a_form->getInput("comments"));
253  $this->object->setProfilePicture($a_form->getInput("ppic"));
254  /*
255  $this->object->setBackgroundColor($a_form->getInput("bg_color"));
256  $this->object->setFontcolor($a_form->getInput("font_color"));
257  */
258 
259  $prfa_set = new ilSetting("prfa");
260 
261  if ($_FILES["banner"]["tmp_name"]) {
262  $this->object->uploadImage($_FILES["banner"]);
263  } elseif ($prfa_set->get('banner') and $a_form->getItemByPostVar("banner")->getDeletionFlag()) {
264  $this->object->deleteImage();
265  }
266  }
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 282 of file class.ilObjPortfolioBaseGUI.php.

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

283  {
284  $ilToolbar = $this->toolbar;
286  $tree = $this->tree;
287 
288  if (!$this->checkPermissionBool("write")) {
289  $this->ctrl->redirect($this, "infoScreen");
290  }
291 
292  $this->tabs_gui->activateTab("pages");
293 
294  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
295 
296  $button = ilLinkButton::getInstance();
297  $button->setCaption("prtf_add_page");
298  $button->setUrl($this->ctrl->getLinkTarget($this, "addPage"));
299  $ilToolbar->addStickyItem($button);
300 
301  if (!$ilSetting->get('disable_wsp_blogs')) {
302  $button = ilLinkButton::getInstance();
303  $button->setCaption("prtf_add_blog");
304  $button->setUrl($this->ctrl->getLinkTarget($this, "addBlog"));
305  $ilToolbar->addStickyItem($button);
306  }
307 
308 
309  // #16571
310  if ($this->getType() == "prtf") {
311  $ilToolbar->addSeparator();
312 
313  $button = ilLinkButton::getInstance();
314  $button->setCaption("export_html");
315  $button->setUrl($this->ctrl->getLinkTarget($this, "export"));
316  $ilToolbar->addButtonInstance($button);
317 
318  $button = ilLinkButton::getInstance();
319  $button->setCaption("prtf_pdf");
320  $button->setUrl($this->ctrl->getLinkTarget($this, "exportPDFSelection"));
321  $ilToolbar->addButtonInstance($button);
322  }
323 
324  include_once "Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
325  $table = new ilPortfolioPageTableGUI($this, "view");
326 
327  // exercise portfolio?
328  include_once "Modules/Portfolio/classes/class.ilPortfolioExerciseGUI.php";
329  $exercises = ilPortfolioExerciseGUI::checkExercise($this->user_id, $this->object->getId(), $table->dataExists());
330  if ($exercises) {
331  ilUtil::sendInfo($exercises);
332  }
333 
334  $this->tpl->setContent($table->getHTML());
335  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getType()
Functions that must be overwritten.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false)
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

Field Documentation

◆ $additional

ilObjPortfolioBaseGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $help

ilObjPortfolioBaseGUI::$help
protected

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

Referenced by addBlog(), and addPage().

◆ $main_menu

ilObjPortfolioBaseGUI::$main_menu
protected

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

Referenced by preview().

◆ $page_id

ilObjPortfolioBaseGUI::$page_id
protected

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

Referenced by copyPage(), and copyPageForm().

◆ $page_mode

ilObjPortfolioBaseGUI::$page_mode
protected

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

◆ $perma_link

ilObjPortfolioBaseGUI::$perma_link
protected

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

◆ $user_id

ilObjPortfolioBaseGUI::$user_id
protected

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

Referenced by preview().


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