ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjPortfolioTemplateGUI Class Reference

Portfolio template view gui class. More...

+ Inheritance diagram for ilObjPortfolioTemplateGUI:
+ Collaboration diagram for ilObjPortfolioTemplateGUI:

Public Member Functions

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

Static Public Member Functions

static _goto ($a_target)
 
- Static Public Member Functions inherited from ilObjPortfolioBaseGUI
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

 setTabs ()
 create tabs (repository/workspace switch) More...
 
 initDidacticTemplate (ilPropertyFormGUI $a_form)
 Show didactic template types. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 getPageInstance ($a_page_id=null, $a_portfolio_id=null)
 Get portfolio template page instance. More...
 
 getPageGUIInstance ($a_page_id)
 Get portfolio template page gui instance. More...
 
 initCopyPageFormOptions (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from ilObjPortfolioBaseGUI
 addLocatorItems ()
 Functions to be overwritten. More...
 
 determinePageCall ()
 
 handlePageCall ($a_cmd)
 
 setSettingsSubTabs ($a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 getPageInstance ($a_page_id=null, $a_portfolio_id=null)
 
 getPageGUIInstance ($a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 addBlog ()
 Show portfolio blog page creation form. More...
 
 initBlogForm ()
 
 saveBlog ()
 
 initCopyPageFormOptions (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 ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (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...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) 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...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 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...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 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...
 

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
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjPortfolioTemplateGUI::_goto (   $a_target)
static

Definition at line 499 of file class.ilObjPortfolioTemplateGUI.php.

500 {
501 $id = explode("_", $a_target);
502
503 $_GET["baseClass"] = "ilRepositoryGUI";
504 $_GET["ref_id"] = $id[0];
505 $_GET["cmd"] = "preview";
506
507 include("ilias.php");
508 exit;
509 }
$_GET["client_id"]

References $_GET, and exit.

◆ afterSave()

ilObjPortfolioTemplateGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 257 of file class.ilObjPortfolioTemplateGUI.php.

258 {
259 if($_POST["prtf"])
260 {
261 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
262 $source = new ilObjPortfolio($_POST["prtf"], false);
263
264 ilObjPortfolio::clonePagesAndSettings($source, $a_new_object);
265 }
266
267 ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
268 $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
269 $this->ctrl->redirect($this, "view");
270 }
$_POST["username"]
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null)
Build template from portfolio and vice versa.
getId()
get object id @access public
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_POST, ilObjPortfolioBase\clonePagesAndSettings(), ilObject\getId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

Definition at line 493 of file class.ilObjPortfolioTemplateGUI.php.

494 {
495 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
496 $this->ctrl->redirectByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
497 }

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 25 of file class.ilObjPortfolioTemplateGUI.php.

26 {
27 global $ilNavigationHistory;
28
29 // add entry to navigation history
30 if(!$this->getCreationMode() &&
31 $this->getAccessHandler()->checkAccess("read", "", $this->node_id))
32 {
33 $link = $this->ctrl->getLinkTarget($this, "view");
34 $ilNavigationHistory->addItem($this->node_id, $link, "prtt");
35 }
36
37 $next_class = $this->ctrl->getNextClass($this);
38 $cmd = $this->ctrl->getCmd("view");
39
40 switch($next_class)
41 {
42 case 'ilportfoliotemplatepagegui':
43 $this->determinePageCall(); // has to be done before locator!
44 $this->prepareOutput();
45 $this->handlePageCall($cmd);
46 break;
47
48 case "ilnotegui";
49 $this->preview();
50 break;
51
52 case "ilinfoscreengui":
53 $this->prepareOutput();
54 $this->addHeaderAction("view");
55 $this->infoScreenForward();
56 break;
57
58 case "ilcommonactiondispatchergui":
59 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
61 $this->ctrl->forwardCommand($gui);
62 break;
63
64 case "ilpermissiongui":
65 $this->prepareOutput();
66 $this->tabs_gui->activateTab("id_permissions");
67 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
68 $perm_gui = new ilPermissionGUI($this);
69 $this->ctrl->forwardCommand($perm_gui);
70 break;
71
72 case "ilobjectcopygui":
73 $this->prepareOutput();
74 include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
75 $cp = new ilObjectCopyGUI($this);
76 $cp->setType("prtt");
77 $this->ctrl->forwardCommand($cp);
78 break;
79
80 case 'ilexportgui':
81 $this->prepareOutput();
82 $this->tabs_gui->activateTab("export");
83 include_once("./Services/Export/classes/class.ilExportGUI.php");
84 $exp_gui = new ilExportGUI($this);
85 $exp_gui->addFormat("xml");
86 $this->ctrl->forwardCommand($exp_gui);
87 break;
88
89 case "ilobjstylesheetgui":
90 include_once ("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
91 $this->ctrl->setReturn($this, "editStyleProperties");
92 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
93 $style_gui->omitLocator();
94 if ($cmd == "create" || $_GET["new_type"]=="sty")
95 {
96 $style_gui->setCreationMode(true);
97 }
98
99 if ($cmd == "confirmedDelete")
100 {
101 $this->object->setStyleSheetId(0);
102 $this->object->update();
103 }
104
105 $ret = $this->ctrl->forwardCommand($style_gui);
106
107 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
108 {
109 $style_id = $ret;
110 $this->object->setStyleSheetId($style_id);
111 $this->object->update();
112 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
113 }
114 break;
115
116 default:
117 $this->addHeaderAction($cmd);
119 }
120 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
Class ilObjStyleSheetGUI.
executeCommand()
execute command
getAccessHandler()
Get access handler.
prepareOutput($a_show_subobjects=true)
prepare output
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $ret, ilObjectGUI\addHeaderAction(), ilObjPortfolioBaseGUI\determinePageCall(), ilObject2GUI\executeCommand(), ilObject2GUI\getAccessHandler(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjPortfolioBaseGUI\handlePageCall(), infoScreenForward(), ilObject2GUI\prepareOutput(), and preview().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjPortfolioTemplateGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Parameters
array$a_values

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 312 of file class.ilObjPortfolioTemplateGUI.php.

313 {
314 $a_values["online"] = $this->object->isOnline();
315 $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
316 ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
317 : null;
318 $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
319 ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
320 : null;
321 $a_values["access_visiblity"] = $this->object->getActivationVisibility();
322
323 parent::getEditFormCustomValues($a_values);
324 }
const IL_CAL_UNIX
@classDescription Date and time handling

References IL_CAL_UNIX.

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 390 of file class.ilObjPortfolioTemplateGUI.php.

391 {
392 return "ilportfoliotemplatepagegui";
393 }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance (   $a_page_id)
protected

Get portfolio template page gui instance.

Parameters
int$a_page_id
Returns
ilPortfolioTemplatePageGUI

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 377 of file class.ilObjPortfolioTemplateGUI.php.

378 {
379 include_once("Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
380 $page_gui = new ilPortfolioTemplatePageGUI(
381 $this->object->getId(),
382 $a_page_id,
383 0,
384 $this->object->hasPublicComments()
385 );
386 $page_gui->setAdditional($this->getAdditional());
387 return $page_gui;
388 }
getAdditional()
Get Additonal Information.
Portfolio template page gui class.

References ilObjPortfolioBaseGUI\getAdditional().

+ Here is the call graph for this function:

◆ getPageInstance()

ilObjPortfolioTemplateGUI::getPageInstance (   $a_page_id = null,
  $a_portfolio_id = null 
)
protected

Get portfolio template page instance.

Parameters
int$a_page_id
int$a_portfolio_id
Returns
ilPortfolioTemplatePage

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 359 of file class.ilObjPortfolioTemplateGUI.php.

360 {
361 if(!$a_portfolio_id && $this->object)
362 {
363 $a_portfolio_id = $this->object->getId();
364 }
365 include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
366 $page = new ilPortfolioTemplatePage($a_page_id);
367 $page->setPortfolioId($a_portfolio_id);
368 return $page;
369 }
Page for portfolio template.

Referenced by saveBlog().

+ Here is the caller graph for this function:

◆ getType()

ilObjPortfolioTemplateGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

21 {
22 return "prtt";
23 }

◆ infoScreen()

ilObjPortfolioTemplateGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 169 of file class.ilObjPortfolioTemplateGUI.php.

170 {
171 $this->ctrl->setCmd("showSummary");
172 $this->ctrl->setCmdClass("ilinfoscreengui");
173 $this->infoScreenForward();
174 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

180 {
181 global $ilTabs, $ilToolbar;
182
183 $ilTabs->activateTab("id_info");
184
185 $this->checkPermission("visible");
186
187 if ($this->checkPermissionBool("read"))
188 {
189 $this->lng->loadLanguageModule("cntr");
190
191 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
192 $button = ilLinkButton::getInstance();
193 $button->setPrimary(true);
194 $button->setCaption("prtf_create_portfolio_from_template");
195 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
196 $ilToolbar->addButtonInstance($button);
197 }
198
199 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
200 $info = new ilInfoScreenGUI($this);
201
202 $info->enablePrivateNotes();
203
204 if ($this->checkPermissionBool("read"))
205 {
206 $info->enableNews();
207 }
208
209 // no news editing for files, just notifications
210 $info->enableNewsEditing(false);
211 if ($this->checkPermissionBool("write"))
212 {
213 $news_set = new ilSetting("news");
214 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
215
216 if ($enable_internal_rss)
217 {
218 $info->setBlockProperty("news", "settings", true);
219 $info->setBlockProperty("news", "public_notifications_option", true);
220 }
221 }
222
223 // standard meta data
224 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
225
226 $this->ctrl->forwardCommand($info);
227 }
Class ilInfoScreenGUI.
static getInstance()
Factory.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
ILIAS Setting Class.
$info
Definition: example_052.php:80

References $info, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), and ilLinkButton\getInstance().

Referenced by executeCommand(), and infoScreen().

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

◆ initBlogForm()

ilObjPortfolioTemplateGUI::initBlogForm ( )

Init blog template page form.

Parameters
string$a_mode
Returns
ilPropertyFormGUI

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 426 of file class.ilObjPortfolioTemplateGUI.php.

427 {
428 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
429 $form = new ilPropertyFormGUI();
430 $form->setFormAction($this->ctrl->getFormAction($this));
431
432 $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
433 $obj->setRequired(true);
434 $form->addItem($obj);
435
436 // save and cancel commands
437 $form->setTitle($this->lng->txt("prtf_add_blog").": ".
438 $this->object->getTitle());
439 $form->addCommandButton("saveBlog", $this->lng->txt("save"));
440 $form->addCommandButton("view", $this->lng->txt("cancel"));
441
442 return $form;
443 }
This class represents a property form user interface.
This class represents a text property in a property form.

Referenced by saveBlog().

+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioTemplateGUI::initCopyPageFormOptions ( ilPropertyFormGUI  $a_form)
protected

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 395 of file class.ilObjPortfolioTemplateGUI.php.

396 {
397 // always existing prtft
398 $hi = new ilHiddenInputGUI("target");
399 $hi->setValue("old");
400 $a_form->addItem($hi);
401
402 $options = array();
404 foreach($all as $id => $title)
405 {
406 $options[$id] = $title;
407 }
408 $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
409 $prtf->setRequired(true);
410 $prtf->setOptions($options);
411 $a_form->addItem($prtf);
412
413 }
This class represents a hidden form property in a property form.
static getAvailablePortfolioTemplates($a_permission="read")
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a selection list property in a property form.
if(!is_array($argv)) $options

References $options, $title, ilPropertyFormGUI\addItem(), and ilObjPortfolioTemplate\getAvailablePortfolioTemplates().

+ Here is the call graph for this function:

◆ initDidacticTemplate()

ilObjPortfolioTemplateGUI::initDidacticTemplate ( ilPropertyFormGUI  $form)
protected

Show didactic template types.

Parameters
ilPropertyFormGUI$form
Returns
ilPropertyFormGUI $form

Reimplemented from ilObjectGUI.

Definition at line 234 of file class.ilObjPortfolioTemplateGUI.php.

235 {
236 global $ilUser;
237
238 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
240 if(sizeof($all))
241 {
242 $opts = array(""=>$this->lng->txt("please_select"));
243 foreach($all as $item)
244 {
245 $opts[$item["id"]] = $item["title"];
246 }
247 $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
248 $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
249 $prtf->setOptions($opts);
250 $a_form->addItem($prtf);
251 }
252
253 // yeah, I know.
254 return $a_form;
255 }
static getPortfoliosOfUser($a_user_id)
Get views of user.
$ilUser
Definition: imgupload.php:18

References $ilUser, ilPropertyFormGUI\addItem(), and ilObjPortfolio\getPortfoliosOfUser().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjPortfolioTemplateGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 272 of file class.ilObjPortfolioTemplateGUI.php.

273 {
274 // activation/availability
275
276 include_once "Services/Object/classes/class.ilObjectActivation.php";
277 $this->lng->loadLanguageModule('rep');
278
280 $section->setTitle($this->lng->txt('rep_activation_availability'));
281 $a_form->addItem($section);
282
283 // additional info only with multiple references
284 $act_obj_info = $act_ref_info = "";
285 if(sizeof(ilObject::_getAllReferences($this->object->getId())) > 1)
286 {
287 $act_obj_info = ' '.$this->lng->txt('rep_activation_online_object_info');
288 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
289 }
290
291 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'),'online');
292 $online->setInfo($this->lng->txt('prtt_activation_online_info').$act_obj_info);
293 $a_form->addItem($online);
294
295 include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
296 $dur = new ilDateDurationInputGUI($this->lng->txt("rep_visibility_until"), "access_period");
297 $dur->setShowTime(true);
298 $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
299 $a_form->addItem($dur);
300
301 $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
302 $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
303 $dur->addSubItem($visible);
304
306 $section->setTitle($this->lng->txt('properties'));
307 $a_form->addItem($section);
308
309 parent::initEditCustomForm($a_form);
310 }
$section
Definition: Utf8Test.php:83
This class represents a checkbox property in a property form.
input GUI for a time span (start and end date)
This class represents a section header in a property form.
static _getAllReferences($a_id)
get all reference ids of object

References $section, ilObject\_getAllReferences(), and ilPropertyFormGUI\addItem().

+ Here is the call graph for this function:

◆ preview()

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

Show user page.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 475 of file class.ilObjPortfolioTemplateGUI.php.

476 {
477 if(!$this->checkPermissionBool("write") &&
478 $this->checkPermissionBool("read"))
479 {
480 $this->lng->loadLanguageModule("cntr");
481
482 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
483 $button = ilLinkButton::getInstance();
484 $button->setPrimary(true);
485 $button->setCaption("prtf_create_portfolio_from_template");
486 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
487 $this->tpl->setHeaderActionMenu($button->render());
488 }
489
490 return parent::preview($a_return , $a_content, $a_show_notes);
491 }
$a_content
Definition: workflow.php:94

References $a_content, ilObject2GUI\checkPermissionBool(), and ilLinkButton\getInstance().

Referenced by executeCommand().

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

◆ saveBlog()

ilObjPortfolioTemplateGUI::saveBlog ( )

Create new portfolio blog template page.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 448 of file class.ilObjPortfolioTemplateGUI.php.

449 {
450 $form = $this->initBlogForm();
451 if ($form->checkInput() && $this->checkPermissionBool("write"))
452 {
453 $page = $this->getPageInstance();
455 $page->setTitle($form->getInput("blog"));
456 $page->create();
457
458 ilUtil::sendSuccess($this->lng->txt("prtf_blog_page_created"), true);
459 $this->ctrl->redirect($this, "view");
460 }
461
462 $this->tabs_gui->clearTargets();
463 $this->tabs_gui->setBackTarget($this->lng->txt("back"),
464 $this->ctrl->getLinkTarget($this, "view"));
465
466 $form->setValuesByPost();
467 $this->tpl->setContent($form->getHtml());
468 }
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initBlogForm()
Init blog template page form.

References getPageInstance(), initBlogForm(), ilUtil\sendSuccess(), and ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE.

+ Here is the call graph for this function:

◆ setTabs()

ilObjPortfolioTemplateGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 122 of file class.ilObjPortfolioTemplateGUI.php.

123 {
124 global $ilHelp;
125
126 $ilHelp->setScreenIdComponent("prtt");
127
128 if($this->checkPermissionBool("write"))
129 {
130 $this->tabs_gui->addTab("pages",
131 $this->lng->txt("content"),
132 $this->ctrl->getLinkTarget($this, "view"));
133 }
134
135 if ($this->checkPermissionBool("read"))
136 {
137 $this->tabs_gui->addTab("id_info",
138 $this->lng->txt("info_short"),
139 $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary"));
140 }
141
142 if($this->checkPermissionBool("write"))
143 {
144 $this->tabs_gui->addTab("settings",
145 $this->lng->txt("settings"),
146 $this->ctrl->getLinkTarget($this, "edit"));
147
148 $this->tabs_gui->addTab("export",
149 $this->lng->txt("export"),
150 $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
151 }
152
153 if ($this->checkPermissionBool("read"))
154 {
155 $this->tabs_gui->addNonTabbedLink("preview",
156 $this->lng->txt("user_profile_preview"),
157 $this->ctrl->getLinkTarget($this, "preview"));
158 }
159
160 // will add permissions if needed
162 }
setTabs()
create tabs (repository/workspace switch)

References ilObject2GUI\checkPermissionBool(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjPortfolioTemplateGUI::updateCustom ( ilPropertyFormGUI  $a_form)

Insert custom update form values into object.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 326 of file class.ilObjPortfolioTemplateGUI.php.

327 {
328 $this->object->setOnline($a_form->getInput("online"));
329
330 // activation
331 $period = $a_form->getItemByPostVar("access_period");
332 if($period->getStart() && $period->getEnd())
333 {
334 $this->object->setActivationLimited(true);
335 $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
336 $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
337 $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
338 }
339 else
340 {
341 $this->object->setActivationLimited(false);
342 }
343
344 parent::updateCustom($a_form);
345 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
getItemByPostVar($a_post_var)
Get Item by POST variable.

References ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), and IL_CAL_UNIX.

+ Here is the call graph for this function:

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