ILIAS  release_4-4 Revision
ilObjPortfolioTemplateGUI Class Reference

Portfolio template view gui class. More...

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

Public Member Functions

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

Protected Member Functions

 setTabs ()
 
 initDidacticTemplate (ilPropertyFormGUI $a_form)
 
 afterSave (ilObject $a_new_object)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 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 (ilFormPropertyGUI $a_tgt)
 
- Protected Member Functions inherited from ilObjPortfolioBaseGUI
 addLocatorItems ()
 
 determinePageCall ()
 
 handlePageCall ($a_cmd)
 
 setSettingsSubTabs ($a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 getPageInstance ($a_page_id=null, $a_portfolio_id=null)
 
 getPageGUIInstance ($a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 addBlog ()
 Show portfolio blog page creation form. More...
 
 initBlogForm ()
 
 saveBlog ()
 
 initCopyPageFormOptions (ilFormPropertyGUI $a_tgt)
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

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 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
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 

Detailed Description

Member Function Documentation

◆ _goto()

ilObjPortfolioTemplateGUI::_goto (   $a_target)

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

References $_GET, and exit.

506  {
507  $id = explode("_", $a_target);
508 
509  $_GET["baseClass"] = "ilRepositoryGUI";
510  $_GET["ref_id"] = $id[0];
511  $_GET["cmd"] = "preview";
512 
513  include("ilias.php");
514  exit;
515  }
exit
Definition: login.php:54
$_GET["client_id"]

◆ afterSave()

ilObjPortfolioTemplateGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

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

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

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

500  {
501  $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
502  $this->ctrl->redirectByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
503  }

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

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

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

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

◆ getEditFormCustomValues()

ilObjPortfolioTemplateGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

323  {
324  $a_values["online"] = $this->object->isOnline();
325  $a_values["access_type"] = $this->object->isActivationLimited();
326  $a_values["access_visiblity"] = $this->object->getActivationVisibility();
327 
328  parent::getEditFormCustomValues($a_values);
329  }

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

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

397  {
398  return "ilportfoliotemplatepagegui";
399  }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance (   $a_page_id)
protected

Get portfolio template page gui instance.

Parameters
int$a_page_id
Returns
ilPortfolioTemplatePageGUI

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

References ilObjPortfolioBaseGUI\getAdditional(), and ilPortfolioPageGUI\setAdditional().

384  {
385  include_once("Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
386  $page_gui = new ilPortfolioTemplatePageGUI(
387  $this->object->getId(),
388  $a_page_id,
389  0,
390  $this->object->hasPublicComments()
391  );
392  $page_gui->setAdditional($this->getAdditional());
393  return $page_gui;
394  }
getAdditional()
Get Additonal Information.
setAdditional($a_additional)
Set Additonal Information.
Portfolio template page gui class.
+ 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

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

Referenced by saveBlog().

366  {
367  if(!$a_portfolio_id && $this->object)
368  {
369  $a_portfolio_id = $this->object->getId();
370  }
371  include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
372  $page = new ilPortfolioTemplatePage($a_page_id);
373  $page->setPortfolioId($a_portfolio_id);
374  return $page;
375  }
Page for portfolio template.
+ Here is the caller graph for this function:

◆ getType()

ilObjPortfolioTemplateGUI::getType ( )

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

21  {
22  return "prtt";
23  }

◆ infoScreen()

ilObjPortfolioTemplateGUI::infoScreen ( )

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

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

References infoScreenForward().

170  {
171  $this->ctrl->setCmd("showSummary");
172  $this->ctrl->setCmdClass("ilinfoscreengui");
173  $this->infoScreenForward();
174  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

References $ilErr, and ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), and infoScreen().

180  {
181  global $ilTabs, $ilErr, $ilToolbar;
182 
183  $ilTabs->activateTab("id_info");
184 
185  if (!$this->checkPermissionBool("visible"))
186  {
187  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
188  }
189 
190  if ($this->checkPermissionBool("read"))
191  {
192  $this->lng->loadLanguageModule("cntr");
193  $ilToolbar->addButton($this->lng->txt("prtf_create_portfolio_from_template"),
194  $this->ctrl->getLinkTarget($this, "createfromtemplate"),
195  "", "", "", "", "submit emphsubmit");
196  }
197 
198  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
199  $info = new ilInfoScreenGUI($this);
200 
201  $info->enablePrivateNotes();
202 
203  if ($this->checkPermissionBool("read"))
204  {
205  $info->enableNews();
206  }
207 
208  // no news editing for files, just notifications
209  $info->enableNewsEditing(false);
210  if ($this->checkPermissionBool("write"))
211  {
212  $news_set = new ilSetting("news");
213  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
214 
215  if ($enable_internal_rss)
216  {
217  $info->setBlockProperty("news", "settings", true);
218  $info->setBlockProperty("news", "public_notifications_option", true);
219  }
220  }
221 
222  // standard meta data
223  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
224 
225  $this->ctrl->forwardCommand($info);
226  }
ILIAS Setting Class.
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ 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

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

References ilFormPropertyGUI\setRequired().

Referenced by saveBlog().

436  {
437  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
438  $form = new ilPropertyFormGUI();
439  $form->setFormAction($this->ctrl->getFormAction($this));
440 
441  $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
442  $obj->setRequired(true);
443  $form->addItem($obj);
444 
445  // save and cancel commands
446  $form->setTitle($this->lng->txt("prtf_add_blog").": ".
447  $this->object->getTitle());
448  $form->addCommandButton("saveBlog", $this->lng->txt("save"));
449  $form->addCommandButton("view", $this->lng->txt("cancel"));
450 
451  return $form;
452  }
This class represents a property form user interface.
This class represents a text property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopyPageFormOptions()

ilObjPortfolioTemplateGUI::initCopyPageFormOptions ( ilFormPropertyGUI  $a_tgt)
protected

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

References $options, ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), and ilFormPropertyGUI\setRequired().

402  {
403  $old = new ilRadioOption($this->lng->txt("prtf_existing_portfolio"), "old");
404  $a_tgt->addOption($old);
405 
406  $options = array();
408  foreach($all as $id => $title)
409  {
410  if(true /* $id != $this->object->getId() */)
411  {
412  $options[$id] = $title;
413  }
414  }
415  $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
416  $prtf->setRequired(true);
417  $prtf->setOptions($options);
418  $old->addSubItem($prtf);
419 
420  // no option to create new template here
421  $a_tgt->setValue("old");
422  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
if(!is_array($argv)) $options
static getAvailablePortfolioTemplates($a_permission="read")
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ initDidacticTemplate()

ilObjPortfolioTemplateGUI::initDidacticTemplate ( ilPropertyFormGUI  $a_form)
protected

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

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

234  {
235  global $ilUser;
236 
237  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
238  $all = ilObjPortfolio::getPortfoliosOfUser($ilUser->getId());
239  if(sizeof($all))
240  {
241  $opts = array(""=>$this->lng->txt("please_select"));
242  foreach($all as $item)
243  {
244  $opts[$item["id"]] = $item["title"];
245  }
246  $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
247  $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
248  $prtf->setOptions($opts);
249  $a_form->addItem($prtf);
250  }
251 
252  // yeah, I know.
253  return $a_form;
254  }
This class represents a selection list property in a property form.
static getPortfoliosOfUser($a_user_id)
Get views of user.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjPortfolioTemplateGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

References $section, ilObject\_getAllReferences(), ilPropertyFormGUI\addItem(), IL_CAL_UNIX, ilFormPropertyGUI\setInfo(), and ilDateDurationInputGUI\setShowTime().

272  {
273  // activation/availability
274 
275  include_once "Services/Object/classes/class.ilObjectActivation.php";
276  $this->lng->loadLanguageModule('rep');
277 
279  $section->setTitle($this->lng->txt('rep_activation_availability'));
280  $a_form->addItem($section);
281 
282  // additional info only with multiple references
283  $act_obj_info = $act_ref_info = "";
284  if(sizeof(ilObject::_getAllReferences($this->object->getId())) > 1)
285  {
286  $act_obj_info = ' '.$this->lng->txt('rep_activation_online_object_info');
287  $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
288  }
289 
290  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'),'online');
291  $online->setInfo($this->lng->txt('prtt_activation_online_info').$act_obj_info);
292  $a_form->addItem($online);
293 
294  $act_type = new ilCheckboxInputGUI($this->lng->txt('rep_visibility_until'),'access_type');
295  // $act_type->setInfo($this->lng->txt('prtt_availability_until_info'));
296 
297  $this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
298  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
299  $dur = new ilDateDurationInputGUI($this->lng->txt("rep_time_period"), "access_period");
300  $dur->setShowTime(true);
301  $date = $this->object->getActivationStartDate();
302  $dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
303  $dur->setStartText($this->lng->txt('rep_activation_limited_start'));
304  $date = $this->object->getActivationEndDate();
305  $dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
306  $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
307  $act_type->addSubItem($dur);
308 
309  $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
310  $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
311  $act_type->addSubItem($visible);
312 
313  $a_form->addItem($act_type);
314 
316  $section->setTitle($this->lng->txt('properties'));
317  $a_form->addItem($section);
318 
319  parent::initEditCustomForm($a_form);
320  }
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
const IL_CAL_UNIX
static _getAllReferences($a_id)
get all reference ids of object
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:84
input GUI for a time span (start and end date)
Date and time handling
setShowTime($a_showtime)
Set Show Time Information.
+ Here is the call graph for this function:

◆ preview()

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

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

References ilObject2GUI\checkPermissionBool().

Referenced by executeCommand().

485  {
486  if(!$this->checkPermissionBool("write") &&
487  $this->checkPermissionBool("read"))
488  {
489  $this->lng->loadLanguageModule("cntr");
490  $url = $this->ctrl->getLinkTarget($this, "createfromtemplate");
491  $button = '<a href="'.$url.'" class="submit emphsubmit">'.
492  $this->lng->txt("prtf_create_portfolio_from_template").'</a>';
493  $this->tpl->setHeaderActionMenu($button);
494  }
495 
496  return parent::preview($a_return , $a_content, $a_show_notes);
497  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ 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.

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

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

458  {
459  $form = $this->initBlogForm();
460  if ($form->checkInput() && $this->checkPermissionBool("write"))
461  {
462  $page = $this->getPageInstance();
464  $page->setTitle($form->getInput("blog"));
465  $page->create();
466 
467  ilUtil::sendSuccess($this->lng->txt("prtf_page_created"), true);
468  $this->ctrl->redirect($this, "view");
469  }
470 
471  $this->tabs_gui->clearTargets();
472  $this->tabs_gui->setBackTarget($this->lng->txt("back"),
473  $this->ctrl->getLinkTarget($this, "view"));
474 
475  $form->setValuesByPost();
476  $this->tpl->setContent($form->getHtml());
477  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initBlogForm()
Init blog template page form.
+ Here is the call graph for this function:

◆ setTabs()

ilObjPortfolioTemplateGUI::setTabs ( )
protected

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

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

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

◆ updateCustom()

ilObjPortfolioTemplateGUI::updateCustom ( ilPropertyFormGUI  $a_form)

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

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

332  {
333  $this->object->setOnline($a_form->getInput("online"));
334 
335  // activation
336  if($a_form->getInput("access_type"))
337  {
338  $this->object->setActivationLimited(true);
339  $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
340 
341  $period = $a_form->getItemByPostVar("access_period");
342  $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
343  $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
344  }
345  else
346  {
347  $this->object->setActivationLimited(false);
348  }
349 
350  parent::updateCustom($a_form);
351  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
const IL_CAL_UNIX
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

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