ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
- 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_obj_id, $a_type)
 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...
 

Static Public Member Functions

static _goto ($a_target)
 
- Static Public Member Functions inherited from ilObjPortfolioBaseGUI
static renderFullscreenHeader ($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
 Render banner, user name. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 setTabs ()
 
 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...
 
 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)
 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

- 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()

static ilObjPortfolioTemplateGUI::_goto (   $a_target)
static

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

References $_GET, and exit.

511  {
512  $id = explode("_", $a_target);
513 
514  $_GET["baseClass"] = "ilRepositoryGUI";
515  $_GET["ref_id"] = $id[0];
516  $_GET["cmd"] = "preview";
517 
518  include("ilias.php");
519  exit;
520  }
exit
Definition: login.php:54
$_GET["client_id"]

◆ afterSave()

ilObjPortfolioTemplateGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

262  {
263  if($_POST["prtf"])
264  {
265  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
266  $source = new ilObjPortfolio($_POST["prtf"], false);
267 
268  ilObjPortfolio::clonePagesAndSettings($source, $a_new_object);
269  }
270 
271  ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
272  $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
273  $this->ctrl->redirect($this, "view");
274  }
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 504 of file class.ilObjPortfolioTemplateGUI.php.

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

◆ 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->addHeaderAction("view");
57  $this->infoScreenForward();
58  break;
59 
60  case "ilcommonactiondispatchergui":
61  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
63  $this->ctrl->forwardCommand($gui);
64  break;
65 
66  case "ilpermissiongui":
67  $this->prepareOutput();
68  $this->tabs_gui->activateTab("id_permissions");
69  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
70  $perm_gui = new ilPermissionGUI($this);
71  $this->ctrl->forwardCommand($perm_gui);
72  break;
73 
74  case "ilobjectcopygui":
75  include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
76  $cp = new ilObjectCopyGUI($this);
77  $cp->setType("prtt");
78  $this->ctrl->forwardCommand($cp);
79  break;
80 
81  case 'ilexportgui':
82  $this->prepareOutput();
83  $this->tabs_gui->activateTab("export");
84  include_once("./Services/Export/classes/class.ilExportGUI.php");
85  $exp_gui = new ilExportGUI($this);
86  $exp_gui->addFormat("xml");
87  $this->ctrl->forwardCommand($exp_gui);
88  break;
89 
90  case "ilobjstylesheetgui":
91  include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
92  $this->ctrl->setReturn($this, "editStyleProperties");
93  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
94  $style_gui->omitLocator();
95  if ($cmd == "create" || $_GET["new_type"]=="sty")
96  {
97  $style_gui->setCreationMode(true);
98  }
99 
100  if ($cmd == "confirmedDelete")
101  {
102  $this->object->setStyleSheetId(0);
103  $this->object->update();
104  }
105 
106  $ret = $this->ctrl->forwardCommand($style_gui);
107 
108  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
109  {
110  $style_id = $ret;
111  $this->object->setStyleSheetId($style_id);
112  $this->object->update();
113  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
114  }
115  break;
116 
117  default:
118  $this->addHeaderAction($cmd);
120  }
121  }
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 327 of file class.ilObjPortfolioTemplateGUI.php.

328  {
329  $a_values["online"] = $this->object->isOnline();
330  $a_values["access_type"] = $this->object->isActivationLimited();
331  $a_values["access_visiblity"] = $this->object->getActivationVisibility();
332 
333  parent::getEditFormCustomValues($a_values);
334  }

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

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

402  {
403  return "ilportfoliotemplatepagegui";
404  }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance (   $a_page_id)
protected

Get portfolio template page gui instance.

Parameters
int$a_page_id
Returns
ilPortfolioTemplatePageGUI

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

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

389  {
390  include_once("Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
391  $page_gui = new ilPortfolioTemplatePageGUI(
392  $this->object->getId(),
393  $a_page_id,
394  0,
395  $this->object->hasPublicComments()
396  );
397  $page_gui->setAdditional($this->getAdditional());
398  return $page_gui;
399  }
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 370 of file class.ilObjPortfolioTemplateGUI.php.

Referenced by saveBlog().

371  {
372  if(!$a_portfolio_id && $this->object)
373  {
374  $a_portfolio_id = $this->object->getId();
375  }
376  include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
377  $page = new ilPortfolioTemplatePage($a_page_id);
378  $page->setPortfolioId($a_portfolio_id);
379  return $page;
380  }
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 170 of file class.ilObjPortfolioTemplateGUI.php.

References infoScreenForward().

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

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreen().

181  {
182  global $ilTabs, $ilErr, $ilToolbar;
183 
184  $ilTabs->activateTab("id_info");
185 
186  if (!$this->checkPermissionBool("visible"))
187  {
188  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
189  }
190 
191  if ($this->checkPermissionBool("read"))
192  {
193  $this->lng->loadLanguageModule("cntr");
194 
195  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
196  $button = ilLinkButton::getInstance();
197  $button->setPrimary(true);
198  $button->setCaption("prtf_create_portfolio_from_template");
199  $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
200  $ilToolbar->addButtonInstance($button);
201  }
202 
203  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
204  $info = new ilInfoScreenGUI($this);
205 
206  $info->enablePrivateNotes();
207 
208  if ($this->checkPermissionBool("read"))
209  {
210  $info->enableNews();
211  }
212 
213  // no news editing for files, just notifications
214  $info->enableNewsEditing(false);
215  if ($this->checkPermissionBool("write"))
216  {
217  $news_set = new ilSetting("news");
218  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
219 
220  if ($enable_internal_rss)
221  {
222  $info->setBlockProperty("news", "settings", true);
223  $info->setBlockProperty("news", "public_notifications_option", true);
224  }
225  }
226 
227  // standard meta data
228  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
229 
230  $this->ctrl->forwardCommand($info);
231  }
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 437 of file class.ilObjPortfolioTemplateGUI.php.

References ilFormPropertyGUI\setRequired().

Referenced by saveBlog().

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

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

407  {
408  $old = new ilRadioOption($this->lng->txt("prtf_existing_portfolio"), "old");
409  $a_tgt->addOption($old);
410 
411  $options = array();
413  foreach($all as $id => $title)
414  {
415  $options[$id] = $title;
416  }
417  $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
418  $prtf->setRequired(true);
419  $prtf->setOptions($options);
420  $old->addSubItem($prtf);
421 
422  // no option to create new template here
423  $a_tgt->setValue("old");
424  }
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 238 of file class.ilObjPortfolioTemplateGUI.php.

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

239  {
240  global $ilUser;
241 
242  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
243  $all = ilObjPortfolio::getPortfoliosOfUser($ilUser->getId());
244  if(sizeof($all))
245  {
246  $opts = array(""=>$this->lng->txt("please_select"));
247  foreach($all as $item)
248  {
249  $opts[$item["id"]] = $item["title"];
250  }
251  $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
252  $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
253  $prtf->setOptions($opts);
254  $a_form->addItem($prtf);
255  }
256 
257  // yeah, I know.
258  return $a_form;
259  }
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 276 of file class.ilObjPortfolioTemplateGUI.php.

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

277  {
278  // activation/availability
279 
280  include_once "Services/Object/classes/class.ilObjectActivation.php";
281  $this->lng->loadLanguageModule('rep');
282 
284  $section->setTitle($this->lng->txt('rep_activation_availability'));
285  $a_form->addItem($section);
286 
287  // additional info only with multiple references
288  $act_obj_info = $act_ref_info = "";
289  if(sizeof(ilObject::_getAllReferences($this->object->getId())) > 1)
290  {
291  $act_obj_info = ' '.$this->lng->txt('rep_activation_online_object_info');
292  $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
293  }
294 
295  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'),'online');
296  $online->setInfo($this->lng->txt('prtt_activation_online_info').$act_obj_info);
297  $a_form->addItem($online);
298 
299  $act_type = new ilCheckboxInputGUI($this->lng->txt('rep_visibility_until'),'access_type');
300  // $act_type->setInfo($this->lng->txt('prtt_availability_until_info'));
301 
302  $this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
303  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
304  $dur = new ilDateDurationInputGUI($this->lng->txt("rep_time_period"), "access_period");
305  $dur->setShowTime(true);
306  $date = $this->object->getActivationStartDate();
307  $dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
308  $dur->setStartText($this->lng->txt('rep_activation_limited_start'));
309  $date = $this->object->getActivationEndDate();
310  $dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
311  $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
312  $act_type->addSubItem($dur);
313 
314  $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
315  $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
316  $act_type->addSubItem($visible);
317 
318  $a_form->addItem($act_type);
319 
321  $section->setTitle($this->lng->txt('properties'));
322  $a_form->addItem($section);
323 
324  parent::initEditCustomForm($a_form);
325  }
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 486 of file class.ilObjPortfolioTemplateGUI.php.

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

Referenced by executeCommand().

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

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

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

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

124  {
125  global $ilHelp;
126 
127  $ilHelp->setScreenIdComponent("prtt");
128 
129  if($this->checkPermissionBool("write"))
130  {
131  $this->tabs_gui->addTab("pages",
132  $this->lng->txt("content"),
133  $this->ctrl->getLinkTarget($this, "view"));
134  }
135 
136  if ($this->checkPermissionBool("read"))
137  {
138  $this->tabs_gui->addTab("id_info",
139  $this->lng->txt("info_short"),
140  $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary"));
141  }
142 
143  if($this->checkPermissionBool("write"))
144  {
145  $this->tabs_gui->addTab("settings",
146  $this->lng->txt("settings"),
147  $this->ctrl->getLinkTarget($this, "edit"));
148 
149  $this->tabs_gui->addTab("export",
150  $this->lng->txt("export"),
151  $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
152  }
153 
154  if ($this->checkPermissionBool("read"))
155  {
156  $this->tabs_gui->addNonTabbedLink("preview",
157  $this->lng->txt("user_profile_preview"),
158  $this->ctrl->getLinkTarget($this, "preview"));
159  }
160 
161  // will add permissions if needed
163  }
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 336 of file class.ilObjPortfolioTemplateGUI.php.

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

337  {
338  $this->object->setOnline($a_form->getInput("online"));
339 
340  // activation
341  if($a_form->getInput("access_type"))
342  {
343  $this->object->setActivationLimited(true);
344  $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
345 
346  $period = $a_form->getItemByPostVar("access_period");
347  $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
348  $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
349  }
350  else
351  {
352  $this->object->setActivationLimited(false);
353  }
354 
355  parent::updateCustom($a_form);
356  }
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: