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

Portfolio template view gui class. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 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...
 
 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 @access 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 _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...
 
 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 @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...
 
 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

 $nav_history
 
 $help
 
 $tabs
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
 $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

Constructor & Destructor Documentation

◆ __construct()

ilObjPortfolioTemplateGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Reimplemented from ilObjPortfolioBaseGUI.

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

40 {
41 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
42 global $DIC;
43
44 $this->nav_history = $DIC["ilNavigationHistory"];
45 $this->help = $DIC["ilHelp"];
46 $this->tabs = $DIC->tabs();
47 $this->toolbar = $DIC->toolbar();
48 $this->user = $DIC->user();
49 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjPortfolioTemplateGUI::_goto (   $a_target)
static

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

519 {
520 $id = explode("_", $a_target);
521
522 $_GET["baseClass"] = "ilRepositoryGUI";
523 $_GET["ref_id"] = $id[0];
524 $_GET["cmd"] = "preview";
525
526 include("ilias.php");
527 exit;
528 }
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_GET, $id, 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 284 of file class.ilObjPortfolioTemplateGUI.php.

285 {
286 if ($_POST["prtf"]) {
287 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
288 $source = new ilObjPortfolio($_POST["prtf"], false);
289
291 }
292
293 ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
294 $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
295 $this->ctrl->redirect($this, "view");
296 }
$source
Definition: linkback.php:22
$_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, $source, ilObjPortfolioBase\clonePagesAndSettings(), ilObject\getId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

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

513 {
514 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
515 $this->ctrl->redirectByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
516 }

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

57 {
58 $ilNavigationHistory = $this->nav_history;
59
60 // add entry to navigation history
61 if (!$this->getCreationMode() &&
62 $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
63 $link = $this->ctrl->getLinkTarget($this, "view");
64 $ilNavigationHistory->addItem($this->node_id, $link, "prtt");
65 }
66
67 $next_class = $this->ctrl->getNextClass($this);
68 $cmd = $this->ctrl->getCmd("view");
69
70 switch ($next_class) {
71 case 'ilportfoliotemplatepagegui':
72 $this->determinePageCall(); // has to be done before locator!
73 $this->prepareOutput();
74 $this->handlePageCall($cmd);
75 break;
76
77 case "ilnotegui":
78 $this->preview();
79 break;
80
81 case "ilinfoscreengui":
82 $this->prepareOutput();
83 $this->addHeaderAction("view");
84 $this->infoScreenForward();
85 break;
86
87 case "ilcommonactiondispatchergui":
88 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
90 $this->ctrl->forwardCommand($gui);
91 break;
92
93 case "ilpermissiongui":
94 $this->prepareOutput();
95 $this->tabs_gui->activateTab("id_permissions");
96 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
97 $perm_gui = new ilPermissionGUI($this);
98 $this->ctrl->forwardCommand($perm_gui);
99 break;
100
101 case "ilobjectcopygui":
102 $this->prepareOutput();
103 include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
104 $cp = new ilObjectCopyGUI($this);
105 $cp->setType("prtt");
106 $this->ctrl->forwardCommand($cp);
107 break;
108
109 case 'ilexportgui':
110 $this->prepareOutput();
111 $this->tabs_gui->activateTab("export");
112 include_once("./Services/Export/classes/class.ilExportGUI.php");
113 $exp_gui = new ilExportGUI($this);
114 $exp_gui->addFormat("xml");
115 $this->ctrl->forwardCommand($exp_gui);
116 break;
117
118 case "ilobjstylesheetgui":
119 include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
120 $this->ctrl->setReturn($this, "editStyleProperties");
121 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
122 $style_gui->omitLocator();
123 if ($cmd == "create" || $_GET["new_type"]=="sty") {
124 $style_gui->setCreationMode(true);
125 }
126
127 if ($cmd == "confirmedDelete") {
128 $this->object->setStyleSheetId(0);
129 $this->object->update();
130 }
131
132 $ret = $this->ctrl->forwardCommand($style_gui);
133
134 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
135 $style_id = $ret;
136 $this->object->setStyleSheetId($style_id);
137 $this->object->update();
138 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
139 }
140 break;
141
142 default:
143 $this->addHeaderAction($cmd);
145 }
146 }
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

References $_GET, $nav_history, $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 337 of file class.ilObjPortfolioTemplateGUI.php.

338 {
339 $a_values["online"] = $this->object->isOnline();
340 $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
341 ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
342 : null;
343 $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
344 ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
345 : null;
346 $a_values["access_visiblity"] = $this->object->getActivationVisibility();
347
348 parent::getEditFormCustomValues($a_values);
349 }
const IL_CAL_UNIX
@classDescription Date and time handling

References IL_CAL_UNIX.

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

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

412 {
413 return "ilportfoliotemplatepagegui";
414 }

◆ 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 398 of file class.ilObjPortfolioTemplateGUI.php.

399 {
400 include_once("Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
401 $page_gui = new ilPortfolioTemplatePageGUI(
402 $this->object->getId(),
403 $a_page_id,
404 0,
405 $this->object->hasPublicComments()
406 );
407 $page_gui->setAdditional($this->getAdditional());
408 return $page_gui;
409 }
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 381 of file class.ilObjPortfolioTemplateGUI.php.

382 {
383 if (!$a_portfolio_id && $this->object) {
384 $a_portfolio_id = $this->object->getId();
385 }
386 include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
387 $page = new ilPortfolioTemplatePage($a_page_id);
388 $page->setPortfolioId($a_portfolio_id);
389 return $page;
390 }
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 51 of file class.ilObjPortfolioTemplateGUI.php.

52 {
53 return "prtt";
54 }

◆ 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 201 of file class.ilObjPortfolioTemplateGUI.php.

202 {
203 $this->ctrl->setCmd("showSummary");
204 $this->ctrl->setCmdClass("ilinfoscreengui");
205 $this->infoScreenForward();
206 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

212 {
213 $ilTabs = $this->tabs;
214 $ilToolbar = $this->toolbar;
215
216 $ilTabs->activateTab("id_info");
217
218 $this->checkPermission("visible");
219
220 if ($this->checkPermissionBool("read")) {
221 $this->lng->loadLanguageModule("cntr");
222
223 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
224 $button = ilLinkButton::getInstance();
225 $button->setPrimary(true);
226 $button->setCaption("prtf_create_portfolio_from_template");
227 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
228 $ilToolbar->addButtonInstance($button);
229 }
230
231 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
232 $info = new ilInfoScreenGUI($this);
233
234 $info->enablePrivateNotes();
235
236 if ($this->checkPermissionBool("read")) {
237 $info->enableNews();
238 }
239
240 // no news editing for files, just notifications
241 $info->enableNewsEditing(false);
242 if ($this->checkPermissionBool("write")) {
243 $news_set = new ilSetting("news");
244 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
245
246 if ($enable_internal_rss) {
247 $info->setBlockProperty("news", "settings", true);
248 $info->setBlockProperty("news", "public_notifications_option", true);
249 }
250 }
251
252 // standard meta data
253 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
254
255 $this->ctrl->forwardCommand($info);
256 }
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: index.php:5

References $info, $tabs, ilObjectGUI\$toolbar, 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 445 of file class.ilObjPortfolioTemplateGUI.php.

446 {
447 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
448 $form = new ilPropertyFormGUI();
449 $form->setFormAction($this->ctrl->getFormAction($this));
450
451 $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
452 $obj->setRequired(true);
453 $form->addItem($obj);
454
455 // save and cancel commands
456 $form->setTitle($this->lng->txt("prtf_add_blog") . ": " .
457 $this->object->getTitle());
458 $form->addCommandButton("saveBlog", $this->lng->txt("save"));
459 $form->addCommandButton("view", $this->lng->txt("cancel"));
460
461 return $form;
462 }
This class represents a property form user interface.
This class represents a text property in a property form.
if(isset($_POST['submit'])) $form

References $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 416 of file class.ilObjPortfolioTemplateGUI.php.

417 {
418 // always existing prtft
419 $hi = new ilHiddenInputGUI("target");
420 $hi->setValue("old");
421 $a_form->addItem($hi);
422
423 $options = array();
425 foreach ($all as $id => $title) {
427 }
428 $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
429 $prtf->setRequired(true);
430 $prtf->setOptions($options);
431 $a_form->addItem($prtf);
432 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
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.

References $id, $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 263 of file class.ilObjPortfolioTemplateGUI.php.

264 {
266
267 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
269 if (sizeof($all)) {
270 $opts = array(""=>$this->lng->txt("please_select"));
271 foreach ($all as $item) {
272 $opts[$item["id"]] = $item["title"];
273 }
274 $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
275 $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
276 $prtf->setOptions($opts);
277 $a_form->addItem($prtf);
278 }
279
280 // yeah, I know.
281 return $a_form;
282 }
static getPortfoliosOfUser($a_user_id)
Get views of user.
$ilUser
Definition: imgupload.php:18

References $ilUser, ilObjectGUI\$user, 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 298 of file class.ilObjPortfolioTemplateGUI.php.

299 {
300 // activation/availability
301
302 include_once "Services/Object/classes/class.ilObjectActivation.php";
303 $this->lng->loadLanguageModule('rep');
304
306 $section->setTitle($this->lng->txt('rep_activation_availability'));
307 $a_form->addItem($section);
308
309 // additional info only with multiple references
310 $act_obj_info = $act_ref_info = "";
311 if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
312 $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
313 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
314 }
315
316 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
317 $online->setInfo($this->lng->txt('prtt_activation_online_info') . $act_obj_info);
318 $a_form->addItem($online);
319
320 include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
321 $dur = new ilDateDurationInputGUI($this->lng->txt("rep_visibility_until"), "access_period");
322 $dur->setShowTime(true);
323 $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
324 $a_form->addItem($dur);
325
326 $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
327 $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
328 $dur->addSubItem($visible);
329
331 $section->setTitle($this->lng->txt('properties'));
332 $a_form->addItem($section);
333
334 parent::initEditCustomForm($a_form);
335 }
$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 495 of file class.ilObjPortfolioTemplateGUI.php.

496 {
497 if (!$this->checkPermissionBool("write") &&
498 $this->checkPermissionBool("read")) {
499 $this->lng->loadLanguageModule("cntr");
500
501 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
502 $button = ilLinkButton::getInstance();
503 $button->setPrimary(true);
504 $button->setCaption("prtf_create_portfolio_from_template");
505 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
506 $this->tpl->setHeaderActionMenu($button->render());
507 }
508
509 return parent::preview($a_return, $a_content, $a_show_notes);
510 }
$a_content
Definition: workflow.php:93

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 467 of file class.ilObjPortfolioTemplateGUI.php.

468 {
469 $form = $this->initBlogForm();
470 if ($form->checkInput() && $this->checkPermissionBool("write")) {
471 $page = $this->getPageInstance();
473 $page->setTitle($form->getInput("blog"));
474 $page->create();
475
476 ilUtil::sendSuccess($this->lng->txt("prtf_blog_page_created"), true);
477 $this->ctrl->redirect($this, "view");
478 }
479
480 $this->tabs_gui->clearTargets();
481 $this->tabs_gui->setBackTarget(
482 $this->lng->txt("back"),
483 $this->ctrl->getLinkTarget($this, "view")
484 );
485
486 $form->setValuesByPost();
487 $this->tpl->setContent($form->getHtml());
488 }
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initBlogForm()
Init blog template page form.

References $form, 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 148 of file class.ilObjPortfolioTemplateGUI.php.

149 {
150 $ilHelp = $this->help;
151
152 $ilHelp->setScreenIdComponent("prtt");
153
154 if ($this->checkPermissionBool("write")) {
155 $this->tabs_gui->addTab(
156 "pages",
157 $this->lng->txt("content"),
158 $this->ctrl->getLinkTarget($this, "view")
159 );
160 }
161
162 if ($this->checkPermissionBool("read")) {
163 $this->tabs_gui->addTab(
164 "id_info",
165 $this->lng->txt("info_short"),
166 $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary")
167 );
168 }
169
170 if ($this->checkPermissionBool("write")) {
171 $this->tabs_gui->addTab(
172 "settings",
173 $this->lng->txt("settings"),
174 $this->ctrl->getLinkTarget($this, "edit")
175 );
176
177 $this->tabs_gui->addTab(
178 "export",
179 $this->lng->txt("export"),
180 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
181 );
182 }
183
184 if ($this->checkPermissionBool("read")) {
185 $this->tabs_gui->addNonTabbedLink(
186 "preview",
187 $this->lng->txt("user_profile_preview"),
188 $this->ctrl->getLinkTarget($this, "preview")
189 );
190 }
191
192 // will add permissions if needed
194 }
setTabs()
create tabs (repository/workspace switch)

References $help, 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 351 of file class.ilObjPortfolioTemplateGUI.php.

352 {
353 $this->object->setOnline($a_form->getInput("online"));
354
355 // activation
356 $period = $a_form->getItemByPostVar("access_period");
357 if ($period->getStart() && $period->getEnd()) {
358 $this->object->setActivationLimited(true);
359 $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
360 $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
361 $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
362 } else {
363 $this->object->setActivationLimited(false);
364 }
365
366 parent::updateCustom($a_form);
367 }
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:

Field Documentation

◆ $help

ilObjPortfolioTemplateGUI::$help
protected

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

Referenced by setTabs().

◆ $nav_history

ilObjPortfolioTemplateGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $tabs

ilObjPortfolioTemplateGUI::$tabs
protected

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

Referenced by infoScreenForward().


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