ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ($a_with_comments=false)
 
 exportWithComments ()
 
 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...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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 = ""
 
 $ui
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

274 {
275 if ($_POST["prtf"]) {
276 $source = new ilObjPortfolio($_POST["prtf"], false);
277
279 }
280
281 ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
282 $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
283 $this->ctrl->redirect($this, "view");
284 }
$_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 512 of file class.ilObjPortfolioTemplateGUI.php.

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

◆ createFromTemplateOld()

ilObjPortfolioTemplateGUI::createFromTemplateOld ( )

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

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

◆ 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->prepareOutput();
86 $this->ctrl->forwardCommand($gui);
87 break;
88
89 case "ilpermissiongui":
90 $this->prepareOutput();
91 $this->tabs_gui->activateTab("id_permissions");
92 $perm_gui = new ilPermissionGUI($this);
93 $this->ctrl->forwardCommand($perm_gui);
94 break;
95
96 case "ilobjectcopygui":
97 $this->prepareOutput();
98 $cp = new ilObjectCopyGUI($this);
99 $cp->setType("prtt");
100 $this->ctrl->forwardCommand($cp);
101 break;
102
103 case 'ilexportgui':
104 $this->prepareOutput();
105 $this->tabs_gui->activateTab("export");
106 $exp_gui = new ilExportGUI($this);
107 $exp_gui->addFormat("xml");
108 $this->ctrl->forwardCommand($exp_gui);
109 break;
110
111 case "ilobjstylesheetgui":
112 $this->ctrl->setReturn($this, "editStyleProperties");
113 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
114 $style_gui->omitLocator();
115 if ($cmd == "create" || $_GET["new_type"] == "sty") {
116 $style_gui->setCreationMode(true);
117 }
118
119 if ($cmd == "confirmedDelete") {
120 $this->object->setStyleSheetId(0);
121 $this->object->update();
122 }
123
124 $ret = $this->ctrl->forwardCommand($style_gui);
125
126 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
127 $style_id = $ret;
128 $this->object->setStyleSheetId($style_id);
129 $this->object->update();
130 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
131 }
132 break;
133
134 default:
135 $this->addHeaderAction($cmd);
137 }
138 }
$_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 331 of file class.ilObjPortfolioTemplateGUI.php.

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

References IL_CAL_UNIX.

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

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

408 {
409 return "ilportfoliotemplatepagegui";
410 }

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

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

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

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

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

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

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

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

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

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

491 {
492 if (!$this->checkPermissionBool("write") &&
493 $this->checkPermissionBool("read")) {
494 $this->lng->loadLanguageModule("cntr");
495
496 $button = ilLinkButton::getInstance();
497 $button->setPrimary(true);
498 $button->setCaption("prtf_create_portfolio_from_template");
499 $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
500 $this->tpl->setHeaderActionMenu($button->render());
501 }
502
503 return parent::preview($a_return, $a_content, $a_show_notes);
504 }

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

463 {
464 $form = $this->initBlogForm();
465 if ($form->checkInput() && $this->checkPermissionBool("write")) {
466 $page = $this->getPageInstance();
468 $page->setTitle($form->getInput("blog"));
469 $page->create();
470
471 ilUtil::sendSuccess($this->lng->txt("prtf_blog_page_created"), true);
472 $this->ctrl->redirect($this, "view");
473 }
474
475 $this->tabs_gui->clearTargets();
476 $this->tabs_gui->setBackTarget(
477 $this->lng->txt("back"),
478 $this->ctrl->getLinkTarget($this, "view")
479 );
480
481 $form->setValuesByPost();
482 $this->tpl->setContent($form->getHtml());
483 }
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 140 of file class.ilObjPortfolioTemplateGUI.php.

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

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