ILIAS  release_4-4 Revision
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_link)
 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 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...
 
 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 438 of file class.ilObjPortfolioBaseGUI.php.

References initBlogForm(), and saveBlog().

439  {
440  global $ilHelp;
441 
442  $this->tabs_gui->clearTargets();
443  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
444  $this->ctrl->getLinkTarget($this, "view"));
445 
446  $ilHelp->setScreenIdComponent("prtf");
447  $ilHelp->setScreenId("add_blog");
448 
449  $form = $this->initBlogForm();
450  $this->tpl->setContent($form->getHTML());
451  }
+ 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($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 325 of file class.ilObjPortfolioBaseGUI.php.

References initPageForm().

326  {
327  global $ilHelp;
328 
329  $this->tabs_gui->clearTargets();
330  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
331  $this->ctrl->getLinkTarget($this, "view"));
332 
333  $ilHelp->setScreenIdComponent("prtf");
334  $ilHelp->setScreenId("add_page");
335 
336 
337  $form = $this->initPageForm("create");
338  $this->tpl->setContent($form->getHTML());
339  }
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 489 of file class.ilObjPortfolioBaseGUI.php.

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

490  {
491  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
492  {
493  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
494  $this->ctrl->redirect($this, "view");
495  }
496  else
497  {
498  $this->tabs_gui->activateTab("pages");
499 
500  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
501  $cgui = new ilConfirmationGUI();
502  $cgui->setFormAction($this->ctrl->getFormAction($this));
503  $cgui->setHeaderText($this->lng->txt("prtf_sure_delete_portfolio_pages"));
504  $cgui->setCancel($this->lng->txt("cancel"), "view");
505  $cgui->setConfirm($this->lng->txt("delete"), "deletePortfolioPages");
506 
507  foreach ($_POST["prtf_pages"] as $id)
508  {
509  $page = $this->getPageInstance($id);
510  $title = $page->getTitle();
511  if($page->getType() == ilPortfolioPage::TYPE_BLOG)
512  {
513  $title = $this->lng->txt("obj_blog").": ".ilObject::_lookupTitle((int)$title);
514  }
515  $cgui->addItem("prtf_pages[]", $id, $title);
516  }
517 
518  $this->tpl->setContent($cgui->getHTML());
519  }
520  }
$_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 820 of file class.ilObjPortfolioBaseGUI.php.

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

821  {
822  $form = $this->initCopyPageForm();
823  if($form->checkInput())
824  {
825  // existing
826  if($form->getInput("target") == "old")
827  {
828  $portfolio_id = $form->getInput("prtf");
829  }
830  // new
831  else
832  {
833  $portfolio = new ilObjPortfolio();
834  $portfolio->setTitle($form->getInput("title"));
835  $portfolio->create();
836  $portfolio_id = $portfolio->getId();
837  }
838 
839  // copy page(s)
840  foreach($_POST["prtf_pages"] as $page_id)
841  {
842  $source = $this->getPageInstance($page_id);
843  $target = $this->getPageInstance(null, $portfolio_id);
844  $target->setXMLContent($source->copyXmlContent(true)); // copy mobs
845  $target->setType($source->getType());
846  $target->setTitle($source->getTitle());
847  $target->create();
848  }
849 
850  ilUtil::sendSuccess($this->lng->txt("prtf_pages_copied"), true);
851  $this->ctrl->redirect($this, "view");
852  }
853 
854  $form->setValuesByPost();
855  $this->copyPageForm($form);
856  }
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 793 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by copyPage().

794  {
795  if (!is_array($_POST["prtf_pages"]) || count($_POST["prtf_pages"]) == 0)
796  {
797  ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
798  $this->ctrl->redirect($this, "view");
799  }
800  else
801  {
802  $this->tabs_gui->activateTab("pages");
803 
804  if(!$a_form)
805  {
806  $a_form = $this->initCopyPageForm();
807  }
808 
809  foreach($_POST["prtf_pages"] as $page_id)
810  {
811  $item = new ilHiddenInputGUI("prtf_pages[]");
812  $item->setValue($page_id);
813  $a_form->addItem($item);
814  }
815 
816  $this->tpl->setContent($a_form->getHTML());
817  }
818  }
$_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 976 of file class.ilObjPortfolioBaseGUI.php.

977  {
978  $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
979  }

◆ deletePortfolioPages()

ilObjPortfolioBaseGUI::deletePortfolioPages ( )

Delete portfolio pages.

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

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

526  {
527  if(!$this->checkPermissionBool("write"))
528  {
529  return;
530  }
531 
532  if (is_array($_POST["prtf_pages"]))
533  {
534  foreach ($_POST["prtf_pages"] as $id)
535  {
536  $page = $this->getPageInstance($id);
537  $page->delete();
538  }
539  }
540  ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_page_deleted"), true);
541  $this->ctrl->redirect($this, "view");
542  }
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 986 of file class.ilObjPortfolioBaseGUI.php.

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

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

982  {
983  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
984  }

◆ editStyleProperties()

ilObjPortfolioBaseGUI::editStyleProperties ( )

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

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

904  {
905  $this->checkPermission("write");
906 
907  $this->tabs_gui->activateTab("settings");
908  $this->setSettingsSubTabs("style");
909 
910  $form = $this->initStylePropertiesForm();
911  $this->tpl->setContent($form->getHTML());
912  }
checkPermission($a_perm, $a_cmd="")
+ Here is the call graph for this function:

◆ export()

ilObjPortfolioBaseGUI::export ( )

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

References ilUtil\deliverFile().

781  {
782  include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
783  $export = new ilPortfolioHTMLExport($this, $this->object);
784  $zip = $export->buildExportFile();
785 
786  ilUtil::deliverFile($zip, $this->object->getTitle().".zip", '', false, true);
787  }
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 217 of file class.ilObjPortfolioBaseGUI.php.

218  {
219  $a_values["comments"] = $this->object->hasPublicComments();
220  $a_values["ppic"] = $this->object->hasProfilePicture();
221  $a_values["bg_color"] = $this->object->getBackgroundColor();
222  $a_values["font_color"] = $this->object->getFontColor();
223  }

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

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

Referenced by copyPage(), and copyPageForm().

861  {
862  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
863  $form = new ilPropertyFormGUI();
864  $form->setFormAction($this->ctrl->getFormAction($this));
865  $form->setTitle($this->lng->txt("prtf_copy_page"));
866 
867  $tgt = new ilRadioGroupInputGUI($this->lng->txt("target"), "target");
868  $tgt->setRequired(true);
869  $form->addItem($tgt);
870 
871  $this->initCopyPageFormOptions($tgt);
872 
873  $form->addCommandButton("copyPage", $this->lng->txt("save"));
874  $form->addCommandButton("view", $this->lng->txt("cancel"));
875 
876  return $form;
877  }
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 178 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilObjPortfolioGUI\initEditForm().

179  {
180  $this->setSettingsSubTabs("properties");
181 
182  // comments
183  $comments = new ilCheckboxInputGUI($this->lng->txt("prtf_public_comments"), "comments");
184  $a_form->addItem($comments);
185 
186  // profile picture
187  $ppic = new ilCheckboxInputGUI($this->lng->txt("prtf_profile_picture"), "ppic");
188  $a_form->addItem($ppic);
189 
190  $prfa_set = new ilSetting("prfa");
191  if($prfa_set->get("banner"))
192  {
193  include_once "Services/Form/classes/class.ilFileInputGUI.php";
195 
196  $dimensions = " (".$prfa_set->get("banner_width")."x".
197  $prfa_set->get("banner_height").")";
198 
199  $img = new ilImageFileInputGUI($this->lng->txt("prtf_banner").$dimensions, "banner");
200  $a_form->addItem($img);
201 
202  // show existing file
203  $file = $this->object->getImageFullPath(true);
204  if($file)
205  {
206  $img->setImage($file);
207  }
208  }
209 
210  $bg_color = new ilColorPickerInputGUI($this->lng->txt("prtf_background_color"), "bg_color");
211  $a_form->addItem($bg_color);
212 
213  $font_color = new ilColorPickerInputGUI($this->lng->txt("prtf_font_color"), "font_color");
214  $a_form->addItem($font_color);
215  }
ILIAS Setting Class.
print $file
Color picker form for selecting color hexcodes using yui library.
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 347 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by addPage(), and savePage().

348  {
349  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
350  $form = new ilPropertyFormGUI();
351  $form->setFormAction($this->ctrl->getFormAction($this));
352 
353  // title
354  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
355  $ti->setMaxLength(200);
356  $ti->setRequired(true);
357  $form->addItem($ti);
358 
359  // save and cancel commands
360  if ($a_mode == "create")
361  {
362  include_once "Services/Style/classes/class.ilPageLayout.php";
364  if($templates)
365  {
366  $use_template = new ilRadioGroupInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
367  $use_template->setRequired(true);
368  $form->addItem($use_template);
369 
370  $opt = new ilRadioOption($this->lng->txt("none"), 0);
371  $use_template->addOption($opt);
372 
373  foreach ($templates as $templ)
374  {
375  $templ->readObject();
376 
377  $opt = new ilRadioOption($templ->getTitle().$templ->getPreview(), $templ->getId());
378  $use_template->addOption($opt);
379  }
380  }
381 
382  $form->setTitle($this->lng->txt("prtf_add_page").": ".
383  $this->object->getTitle());
384  $form->addCommandButton("savePage", $this->lng->txt("save"));
385  $form->addCommandButton("view", $this->lng->txt("cancel"));
386  }
387  else
388  {
389  /* edit is done directly in table gui
390  $form->setTitle($this->lng->txt("prtf_edit_page"));
391  $form->addCommandButton("updatePage", $this->lng->txt("save"));
392  $form->addCommandButton("view", $this->lng->txt("cancel"));
393  */
394  }
395 
396  return $form;
397  }
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 914 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by editStyleProperties().

915  {
916  global $ilSetting;
917 
918  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
919  $this->lng->loadLanguageModule("style");
920 
921  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
922  $form = new ilPropertyFormGUI();
923 
924  $fixed_style = $ilSetting->get("fixed_content_style_id");
925  $style_id = $this->object->getStyleSheetId();
926 
927  if ($fixed_style > 0)
928  {
929  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
930  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
931  $this->lng->txt("global_fixed").")");
932  $form->addItem($st);
933  }
934  else
935  {
936  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
937  $_GET["ref_id"]);
938 
939  $st_styles[0] = $this->lng->txt("default");
940  ksort($st_styles);
941 
942  if ($style_id > 0)
943  {
944  // individual style
945  if (!ilObjStyleSheet::_lookupStandard($style_id))
946  {
947  $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
948  $st->setValue(ilObject::_lookupTitle($style_id));
949  $form->addItem($st);
950 
951  // delete command
952  $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
953  $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
954  }
955  }
956 
957  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
958  {
959  $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"),
960  "style_id");
961  $style_sel->setOptions($st_styles);
962  $style_sel->setValue($style_id);
963  $form->addItem($style_sel);
964 
965  $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
966  $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
967  }
968  }
969 
970  $form->setTitle($this->lng->txt($this->getType()."_style"));
971  $form->setFormAction($this->ctrl->getFormAction($this));
972 
973  return $form;
974  }
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 547 of file class.ilObjPortfolioBaseGUI.php.

References $_GET, $_REQUEST, ilObject2GUI\$parent_id, $perma_link, ilObject2GUI\$tree, $user_id, ilLink\_getStaticLink(), ilObject2\_lookupTitle(), ilObject2GUI\checkPermissionBool(), exit, ilPortfolioPage\getAllPages(), ilPermanentLinkGUI\getHTML(), getPageGUIInstance(), ilObject2GUI\getType(), setContentStyleSheet(), and ilPortfolioPage\TYPE_BLOG.

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

548  {
549  // public profile
550  if($_REQUEST["back_url"])
551  {
552  $back = $_REQUEST["back_url"];
553  }
554  // shared
555  else if($_GET["baseClass"] != "ilPublicUserProfileGUI" &&
556  $this->user_id && $this->user_id != ANONYMOUS_USER_ID)
557  {
558  if(!$this->checkPermissionBool("write"))
559  {
560  // shared
561  if($this->getType() == "prtf")
562  {
563  $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", $this->object->getOwner());
564  $back = $this->ctrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui"), "showOther");
565  $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", "");
566  }
567  // listgui / parent container
568  else
569  {
570  // #12819
571  global $tree;
572  $parent_id = $tree->getParentId($this->node_id);
573  include_once "Services/Link/classes/class.ilLink.php";
575  }
576  }
577  // owner
578  else
579  {
580  $back = $this->ctrl->getLinkTarget($this, "view");
581  }
582  }
583  $this->tpl->setTopBar($back);
584 
585  $portfolio_id = $this->object->getId();
586  $user_id = $this->object->getOwner();
587 
588  $this->tabs_gui->clearTargets();
589 
590  $pages = ilPortfolioPage::getAllPages($portfolio_id);
591  $current_page = (int)$_GET["user_page"];
592 
593  // validate current page
594  if($pages && $current_page)
595  {
596  $found = false;
597  foreach($pages as $page)
598  {
599  if($page["id"] == $current_page)
600  {
601  $found = true;
602  break;
603  }
604  }
605  if(!$found)
606  {
607  $current_page = null;
608  }
609  }
610 
611  // display first page of portfolio if none given
612  if(!$current_page && $pages)
613  {
614  $current_page = $pages;
615  $current_page = array_shift($current_page);
616  $current_page = $current_page["id"];
617  }
618 
619  // render tabs
620  $current_blog = null;
621  if(count($pages) > 1)
622  {
623  foreach ($pages as $p)
624  {
625  if($p["type"] == ilPortfolioPage::TYPE_BLOG)
626  {
627  // needed for blog comments (see below)
628  if($p["id"] == $current_page)
629  {
630  $current_blog = (int)$p["title"];
631  }
632  include_once "Modules/Blog/classes/class.ilObjBlog.php";
633  $p["title"] = ilObjBlog::_lookupTitle($p["title"]);
634  }
635 
636  $this->ctrl->setParameter($this, "user_page", $p["id"]);
637  $this->tabs_gui->addTab("user_page_".$p["id"],
638  $p["title"],
639  $this->ctrl->getLinkTarget($this, "preview"));
640  }
641 
642  $this->tabs_gui->activateTab("user_page_".$current_page);
643  }
644 
645  $this->ctrl->setParameter($this, "user_page", $current_page);
646 
647  if(!$a_content)
648  {
649  // get current page content
650  $page_gui = $this->getPageGUIInstance($current_page);
651  $page_gui->setEmbedded(true);
652 
653  $content = $this->ctrl->getHTML($page_gui);
654  }
655  else
656  {
657  $content = $a_content;
658  }
659 
660  if($a_return && $this->checkPermissionBool("write"))
661  {
662  return $content;
663  }
664 
665  // blog posting comments are handled within the blog
666  $notes = "";
667  if($a_show_notes && $this->object->hasPublicComments() && !$current_blog)
668  {
669  include_once("./Services/Notes/classes/class.ilNoteGUI.php");
670  $note_gui = new ilNoteGUI($portfolio_id, $current_page, "pfpg");
671  $note_gui->setRepositoryMode(false);
672  $note_gui->enablePublicNotes(true);
673  $note_gui->enablePrivateNotes(false);
674  $note_gui->enablePublicNotesDeletion($this->user_id == $user_id);
675 
676  $next_class = $this->ctrl->getNextClass($this);
677  if ($next_class == "ilnotegui")
678  {
679  $notes = $this->ctrl->forwardCommand($note_gui);
680  }
681  else
682  {
683  $notes = $note_gui->getNotesHTML();
684  }
685  }
686 
687  if($this->perma_link === null)
688  {
689  include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
690  if($this->getType() == "prtf")
691  {
692  $plink = new ilPermanentLinkGUI($this->getType(), $this->object->getId(), "_".$current_page);
693  }
694  else
695  {
696  $plink = new ilPermanentLinkGUI($this->getType(), $this->object->getRefId());
697  }
698  $plink = $plink->getHTML();
699  }
700  else
701  {
702  $plink = $this->perma_link;
703  }
704 
705  self::renderFullscreenHeader($this->object, $this->tpl, $user_id);
706 
707  // wiki/forum will set locator items
708  $this->tpl->setVariable("LOCATOR", "");
709 
710  // blog pages do their own (page) style handling
711  if(!$current_blog)
712  {
713  $content = '<div id="ilCOPageContent" class="ilc_page_cont_PageContainer">'.
714  '<div class="ilc_page_Page">'.
715  $content.
716  '</div></div>';
717 
718  $this->setContentStyleSheet($this->tpl);
719  }
720 
721  // #10717
722  $this->tpl->setContent($content.
723  '<div class="ilClearFloat">'.$notes.$plink.'</div>');
724  $this->tpl->setFrameFixedWidth(true);
725 
726  echo $this->tpl->show("DEFAULT", true, true);
727  exit();
728  }
exit
Definition: login.php:54
Class for permanent links.
static _lookupTitle($a_id)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$_GET["client_id"]
Notes GUI class.
getHTML()
Get HTML for link.
getType()
Functions that must be overwritten.
getPageGUIInstance($a_page_id)
static getAllPages($a_portfolio_id)
Get pages of portfolio.
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 737 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by ilPortfolioHTMLExport\buildExportTemplate().

738  {
739  $name = ilObjUser::_lookupName($a_user_id);
740  $name = $name["lastname"].", ".($t = $name["title"] ? $t . " " : "").$name["firstname"];
741 
742  // show banner?
743  $banner = $banner_width = $banner_height = false;
744  $prfa_set = new ilSetting("prfa");
745  if($prfa_set->get("banner"))
746  {
747  $banner = $a_portfolio->getImageFullPath();
748  $banner_width = $prfa_set->get("banner_width");
749  $banner_height = $prfa_set->get("banner_height");
750  if($a_export)
751  {
752  $banner = basename($banner);
753  }
754  }
755 
756  // profile picture
757  $ppic = null;
758  if($a_portfolio->hasProfilePicture())
759  {
760  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "big");
761  if($a_export)
762  {
763  $ppic = basename($ppic);
764  }
765  }
766 
767  include_once("./Services/User/classes/class.ilUserUtil.php");
768  $a_tpl->setFullscreenHeader($a_portfolio->getTitle(),
769  $name,
770  $ppic,
771  $banner,
772  $a_portfolio->getBackgroundColor(),
773  $a_portfolio->getFontColor(),
774  $banner_width,
775  $banner_height,
776  $a_export);
777  $a_tpl->setBodyClass("std ilExternal ilPortfolio");
778  }
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 402 of file class.ilObjPortfolioBaseGUI.php.

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

403  {
404  $form = $this->initPageForm("create");
405  if ($form->checkInput() && $this->checkPermissionBool("write"))
406  {
407  include_once("Modules/Portfolio/classes/class.ilPortfolioPage.php");
408  $page = $this->getPageInstance();
409  $page->setType(ilPortfolioPage::TYPE_PAGE);
410  $page->setTitle($form->getInput("title"));
411 
412  // use template as basis
413  $layout_id = $form->getInput("tmpl");
414  if($layout_id)
415  {
416  include_once("./Services/Style/classes/class.ilPageLayout.php");
417  $layout_obj = new ilPageLayout($layout_id);
418  $page->setXMLContent($layout_obj->getXMLContent());
419  }
420 
421  $page->create();
422 
423  ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
424  $this->ctrl->redirect($this, "view");
425  }
426 
427  $this->tabs_gui->clearTargets();
428  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
429  $this->ctrl->getLinkTarget($this, "view"));
430 
431  $form->setValuesByPost();
432  $this->tpl->setContent($form->getHtml());
433  }
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 460 of file class.ilObjPortfolioBaseGUI.php.

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

461  {
462  if(!$this->checkPermissionBool("write"))
463  {
464  return;
465  }
466 
467  if (is_array($_POST["order"]))
468  {
469  foreach ($_POST["order"] as $k => $v)
470  {
471  $page = $this->getPageInstance(ilUtil::stripSlashes($k));
472  if($_POST["title"][$k])
473  {
474  $page->setTitle(ilUtil::stripSlashes($_POST["title"][$k]));
475  }
476  $page->setOrderNr(ilUtil::stripSlashes($v));
477  $page->update();
478  }
479  ilPortfolioPage::fixOrdering($this->object->getId());
480  }
481 
482  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
483  $this->ctrl->redirect($this, "view");
484  }
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 991 of file class.ilObjPortfolioBaseGUI.php.

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

992  {
993  global $ilSetting;
994 
995  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
996  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
997  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
998  || $this->object->getStyleSheetId() == 0))
999  {
1000  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1001  $this->object->update();
1002 
1003  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1004  }
1005  $this->ctrl->redirect($this, "editStyleProperties");
1006  }
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 884 of file class.ilObjPortfolioBaseGUI.php.

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

Referenced by handlePageCall(), and preview().

885  {
886  global $tpl;
887 
888  if ($a_tpl != null)
889  {
890  $ctpl = $a_tpl;
891  }
892  else
893  {
894  $ctpl = $tpl;
895  }
896 
897  $ctpl->setCurrentBlock("ContentStyle");
898  $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
899  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
900  $ctpl->parseCurrentBlock();
901  }
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_link)

Set custom perma link (used in public profile?)

Parameters
string$a_link

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

155  {
156  $this->perma_link = $a_link;
157  }

◆ setSettingsSubTabs()

ilObjPortfolioBaseGUI::setSettingsSubTabs (   $a_active)
protected

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

Referenced by editStyleProperties(), and initEditCustomForm().

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

◆ updateCustom()

ilObjPortfolioBaseGUI::updateCustom ( ilPropertyFormGUI  $a_form)

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

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

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

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

259  {
260  global $ilToolbar, $ilSetting, $tree;
261 
262  if(!$this->checkPermissionBool("write"))
263  {
264  $this->ctrl->redirect($this, "infoScreen");
265  }
266 
267  $this->tabs_gui->activateTab("pages");
268 
269  $ilToolbar->addButton($this->lng->txt("prtf_add_page"),
270  $this->ctrl->getLinkTarget($this, "addPage"));
271 
272  if(!$ilSetting->get('disable_wsp_blogs'))
273  {
274  $ilToolbar->addButton($this->lng->txt("prtf_add_blog"),
275  $this->ctrl->getLinkTarget($this, "addBlog"));
276  }
277 
278  $ilToolbar->addSeparator();
279 
280  $ilToolbar->addButton($this->lng->txt("export_html"),
281  $this->ctrl->getLinkTarget($this, "export"));
282 
283  include_once "Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
284  $table = new ilPortfolioPageTableGUI($this, "view");
285 
286  // exercise portfolio?
287  include_once "Modules/Exercise/classes/class.ilObjExercise.php";
288  $exercises = ilObjExercise::findUserFiles($this->user_id, $this->object->getId());
289  if($exercises)
290  {
291  $info = array();
292  foreach($exercises as $exercise)
293  {
294  // #9988
295  $active_ref = false;
296  foreach(ilObject::_getAllReferences($exercise["obj_id"]) as $ref_id)
297  {
298  if(!$tree->isSaved($ref_id))
299  {
300  $active_ref = true;
301  break;
302  }
303  }
304  if($active_ref)
305  {
306  $part = $this->getExerciseInfo($exercise["ass_id"], $table->dataExists());
307  if($part)
308  {
309  $info[] = $part;
310  }
311  }
312  }
313  if(sizeof($info))
314  {
315  ilUtil::sendInfo(implode("<br />", $info));
316  }
317  }
318 
319  $this->tpl->setContent($table->getHTML());
320  }
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.

Referenced by preview().

◆ $user_id

ilObjPortfolioBaseGUI::$user_id
protected

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