ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
 createFromTemplateOld ()
 
 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc 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 ()
 
 showEditButton ($page_id)
 Show edit button. More...
 
 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...
 
 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
 getObjectService ()
 Get object service. More...
 
 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...
 
 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
 
 $requested_ppage
 
 $requested_user_page
 
 $requested_back_url = ""
 
- 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
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Additional Inherited Members

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

36 {
37 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
38 global $DIC;
39
40 $this->nav_history = $DIC["ilNavigationHistory"];
41 $this->help = $DIC["ilHelp"];
42 $this->tabs = $DIC->tabs();
43 $this->toolbar = $DIC->toolbar();
44 $this->user = $DIC->user();
45 }
user()
Definition: user.php:4
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), help(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ afterSave()

ilObjPortfolioTemplateGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

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

273 {
274 if ($_POST["prtf"]) {
275 $source = new ilObjPortfolio($_POST["prtf"], false);
276
278 }
279
280 ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
281 $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
282 $this->ctrl->redirect($this, "view");
283 }
$_POST["username"]
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null, $copy_all=false)
Build template from portfolio and vice versa.
getId()
get object id @access public
$source
Definition: metadata.php:76

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

+ Here is the call graph for this function:

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

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

512 {
513 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
514 $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "createFromTemplateDirect");
515 }

◆ createFromTemplateOld()

ilObjPortfolioTemplateGUI::createFromTemplateOld ( )

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

506 {
507 $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
508 $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
509 }

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

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

331 {
332 $a_values["online"] = $this->object->isOnline();
333 $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
334 ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
335 : null;
336 $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
337 ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
338 : null;
339 $a_values["access_visiblity"] = $this->object->getActivationVisibility();
340
341 parent::getEditFormCustomValues($a_values);
342 }
const IL_CAL_UNIX
@classDescription Date and time handling

References IL_CAL_UNIX.

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

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

407 {
408 return "ilportfoliotemplatepagegui";
409 }

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

395 {
396 $page_gui = new ilPortfolioTemplatePageGUI(
397 $this->object->getId(),
398 $a_page_id,
399 0,
400 $this->object->hasPublicComments()
401 );
402 $page_gui->setAdditional($this->getAdditional());
403 return $page_gui;
404 }
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 378 of file class.ilObjPortfolioTemplateGUI.php.

379 {
380 if (!$a_portfolio_id && $this->object) {
381 $a_portfolio_id = $this->object->getId();
382 }
383 $page = new ilPortfolioTemplatePage($a_page_id);
384 $page->setPortfolioId($a_portfolio_id);
385 return $page;
386 }
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 47 of file class.ilObjPortfolioTemplateGUI.php.

48 {
49 return "prtt";
50 }

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

193 {
194 $this->ctrl->setCmd("showSummary");
195 $this->ctrl->setCmdClass("ilinfoscreengui");
196 $this->infoScreenForward();
197 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

203 {
204 $ilTabs = $this->tabs;
205 $ilToolbar = $this->toolbar;
206
207 $ilTabs->activateTab("id_info");
208
209 $this->checkPermission("visible");
210
211 if ($this->checkPermissionBool("read")) {
212 $this->lng->loadLanguageModule("cntr");
213
214 $button = ilLinkButton::getInstance();
215 $button->setPrimary(true);
216 $button->setCaption("prtf_create_portfolio_from_template");
217 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
218 $ilToolbar->addButtonInstance($button);
219 }
220
221 $info = new ilInfoScreenGUI($this);
222
223 $info->enablePrivateNotes();
224
225 if ($this->checkPermissionBool("read")) {
226 $info->enableNews();
227 }
228
229 // no news editing for files, just notifications
230 $info->enableNewsEditing(false);
231 if ($this->checkPermissionBool("write")) {
232 $news_set = new ilSetting("news");
233 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
234
235 if ($enable_internal_rss) {
236 $info->setBlockProperty("news", "settings", true);
237 $info->setBlockProperty("news", "public_notifications_option", true);
238 }
239 }
240
241 // standard meta data
242 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
243
244 $this->ctrl->forwardCommand($info);
245 }
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.

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

441 {
442 $form = new ilPropertyFormGUI();
443 $form->setFormAction($this->ctrl->getFormAction($this));
444
445 $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
446 $obj->setRequired(true);
447 $form->addItem($obj);
448
449 // save and cancel commands
450 $form->setTitle($this->lng->txt("prtf_add_blog") . ": " .
451 $this->object->getTitle());
452 $form->addCommandButton("saveBlog", $this->lng->txt("save"));
453 $form->addCommandButton("view", $this->lng->txt("cancel"));
454
455 return $form;
456 }
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 411 of file class.ilObjPortfolioTemplateGUI.php.

412 {
413 // always existing prtft
414 $hi = new ilHiddenInputGUI("target");
415 $hi->setValue("old");
416 $a_form->addItem($hi);
417
418 $options = array();
420 foreach ($all as $id => $title) {
421 $options[$id] = $title;
422 }
423 $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
424 $prtf->setRequired(true);
425 $prtf->setOptions($options);
426 $a_form->addItem($prtf);
427 }
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 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 252 of file class.ilObjPortfolioTemplateGUI.php.

253 {
255
257 if (sizeof($all)) {
258 $opts = array("" => $this->lng->txt("please_select"));
259 foreach ($all as $item) {
260 $opts[$item["id"]] = $item["title"];
261 }
262 $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
263 $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
264 $prtf->setOptions($opts);
265 $a_form->addItem($prtf);
266 }
267
268 // yeah, I know.
269 return $a_form;
270 }
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 285 of file class.ilObjPortfolioTemplateGUI.php.

286 {
287 $obj_service = $this->object_service;
288 // activation/availability
289
290 $this->lng->loadLanguageModule('rep');
291
293 $section->setTitle($this->lng->txt('rep_activation_availability'));
294 $a_form->addItem($section);
295
296 // additional info only with multiple references
297 $act_obj_info = $act_ref_info = "";
298 if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
299 $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
300 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
301 }
302
303 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
304 $online->setInfo($this->lng->txt('prtt_activation_online_info') . $act_obj_info);
305 $a_form->addItem($online);
306
307 $dur = new ilDateDurationInputGUI($this->lng->txt("rep_visibility_until"), "access_period");
308 $dur->setShowTime(true);
309 $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
310 $a_form->addItem($dur);
311
312 $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
313 $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
314 $dur->addSubItem($visible);
315
317 $section->setTitle($this->lng->txt('obj_presentation'));
318 $a_form->addItem($section);
319
320 // tile image
321 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
322
323
324 parent::initEditCustomForm($a_form);
325
326 $tit = $a_form->getItemByPostVar("title");
327 $tit->setInfo($this->lng->txt('prtt_title_info'));
328 }
$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
getItemByPostVar($a_post_var)
Get Item by POST variable.

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

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

490 {
491 if (!$this->checkPermissionBool("write") &&
492 $this->checkPermissionBool("read")) {
493 $this->lng->loadLanguageModule("cntr");
494
495 $button = ilLinkButton::getInstance();
496 $button->setPrimary(true);
497 $button->setCaption("prtf_create_portfolio_from_template");
498 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
499 $this->tpl->setHeaderActionMenu($button->render());
500 }
501
502 return parent::preview($a_return, $a_content, $a_show_notes);
503 }
$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 461 of file class.ilObjPortfolioTemplateGUI.php.

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

References getPageInstance(), initBlogForm(), 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 139 of file class.ilObjPortfolioTemplateGUI.php.

140 {
141 $ilHelp = $this->help;
142
143 $ilHelp->setScreenIdComponent("prtt");
144
145 if ($this->checkPermissionBool("write")) {
146 $this->tabs_gui->addTab(
147 "pages",
148 $this->lng->txt("content"),
149 $this->ctrl->getLinkTarget($this, "view")
150 );
151 }
152
153 if ($this->checkPermissionBool("read")) {
154 $this->tabs_gui->addTab(
155 "id_info",
156 $this->lng->txt("info_short"),
157 $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary")
158 );
159 }
160
161 if ($this->checkPermissionBool("write")) {
162 $this->tabs_gui->addTab(
163 "settings",
164 $this->lng->txt("settings"),
165 $this->ctrl->getLinkTarget($this, "edit")
166 );
167
168 $this->tabs_gui->addTab(
169 "export",
170 $this->lng->txt("export"),
171 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
172 );
173 }
174
175 if ($this->checkPermissionBool("read")) {
176 $this->tabs_gui->addNonTabbedLink(
177 "preview",
178 $this->lng->txt("user_profile_preview"),
179 $this->ctrl->getLinkTarget($this, "preview")
180 );
181 }
182
183 // will add permissions if needed
185 }
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 344 of file class.ilObjPortfolioTemplateGUI.php.

345 {
346 $obj_service = $this->object_service;
347
348 $this->object->setOnline($a_form->getInput("online"));
349
350 // activation
351 $period = $a_form->getItemByPostVar("access_period");
352 if ($period->getStart() && $period->getEnd()) {
353 $this->object->setActivationLimited(true);
354 $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
355 $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
356 $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
357 } else {
358 $this->object->setActivationLimited(false);
359 }
360
361 parent::updateCustom($a_form);
362
363 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
364 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilObjectGUI\$object_service, 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 24 of file class.ilObjPortfolioTemplateGUI.php.

Referenced by setTabs().

◆ $nav_history

ilObjPortfolioTemplateGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $tabs

ilObjPortfolioTemplateGUI::$tabs
protected

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

Referenced by infoScreenForward().


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