ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 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)
 
 createFromTemplateOld ()
 
 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 ()
 
 prepareOutput ($a_show_subobjects=true)
 
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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 (ilPropertyFormGUI $a_form)
 
- 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 (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 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...
 
 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...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $nav_history
 
 $help
 
 $tabs
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
 $help
 
 $main_menu
 
 $user_id
 
 $additional = array()
 
 $perma_link
 
 $page_id
 
 $page_mode
 
 $requested_ppage
 
 $requested_user_page
 
 $requested_back_url = ""
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

References $DIC, and user().

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

Member Function Documentation

◆ _goto()

static ilObjPortfolioTemplateGUI::_goto (   $a_target)
static

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

References $_GET, $id, and exit.

537  {
538  $id = explode("_", $a_target);
539 
540  $_GET["baseClass"] = "ilRepositoryGUI";
541  $_GET["ref_id"] = $id[0];
542  $_GET["cmd"] = "preview";
543 
544  include("ilias.php");
545  exit;
546  }
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
exit
Definition: backend.php:16

◆ afterSave()

ilObjPortfolioTemplateGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

285  {
286  if ($_POST["prtf"]) {
287  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
288  $source = new ilObjPortfolio($_POST["prtf"], false);
289 
291  }
292 
293  ilUtil::sendSuccess($this->lng->txt("prtt_portfolio_created"), true);
294  $this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
295  $this->ctrl->redirect($this, "view");
296  }
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 public
$source
Definition: linkback.php:22
$_POST["username"]
+ Here is the call graph for this function:

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

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

531  {
532  $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
533  $this->ctrl->redirectByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "createFromTemplateDirect");
534  }

◆ createFromTemplateOld()

ilObjPortfolioTemplateGUI::createFromTemplateOld ( )

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

525  {
526  $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
527  $this->ctrl->redirectByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
528  }

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

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

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

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

References IL_CAL_UNIX.

346  {
347  $a_values["online"] = $this->object->isOnline();
348  $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
349  ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
350  : null;
351  $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
352  ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
353  : null;
354  $a_values["access_visiblity"] = $this->object->getActivationVisibility();
355 
356  parent::getEditFormCustomValues($a_values);
357  }
const IL_CAL_UNIX
Date and time handling

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

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

424  {
425  return "ilportfoliotemplatepagegui";
426  }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance (   $a_page_id)
protected

Get portfolio template page gui instance.

Parameters
int$a_page_id
Returns
ilPortfolioTemplatePageGUI

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

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

411  {
412  include_once("Modules/Portfolio/classes/class.ilPortfolioTemplatePageGUI.php");
413  $page_gui = new ilPortfolioTemplatePageGUI(
414  $this->object->getId(),
415  $a_page_id,
416  0,
417  $this->object->hasPublicComments()
418  );
419  $page_gui->setAdditional($this->getAdditional());
420  return $page_gui;
421  }
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 393 of file class.ilObjPortfolioTemplateGUI.php.

Referenced by saveBlog().

394  {
395  if (!$a_portfolio_id && $this->object) {
396  $a_portfolio_id = $this->object->getId();
397  }
398  include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
399  $page = new ilPortfolioTemplatePage($a_page_id);
400  $page->setPortfolioId($a_portfolio_id);
401  return $page;
402  }
Page for portfolio template.
+ Here is the caller graph for this function:

◆ getType()

ilObjPortfolioTemplateGUI::getType ( )

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

52  {
53  return "prtt";
54  }

◆ infoScreen()

ilObjPortfolioTemplateGUI::infoScreen ( )

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

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

References infoScreenForward().

202  {
203  $this->ctrl->setCmd("showSummary");
204  $this->ctrl->setCmdClass("ilinfoscreengui");
205  $this->infoScreenForward();
206  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

show information screen

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

References $info, $tabs, ilObjectGUI\$toolbar, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), and ilLinkButton\getInstance().

Referenced by executeCommand(), and infoScreen().

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

References $form, and ilFormPropertyGUI\setRequired().

Referenced by saveBlog().

458  {
459  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
460  $form = new ilPropertyFormGUI();
461  $form->setFormAction($this->ctrl->getFormAction($this));
462 
463  $obj = new ilTextInputGUI($this->lng->txt("title"), "blog");
464  $obj->setRequired(true);
465  $form->addItem($obj);
466 
467  // save and cancel commands
468  $form->setTitle($this->lng->txt("prtf_add_blog") . ": " .
469  $this->object->getTitle());
470  $form->addCommandButton("saveBlog", $this->lng->txt("save"));
471  $form->addCommandButton("view", $this->lng->txt("cancel"));
472 
473  return $form;
474  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
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 ( ilPropertyFormGUI  $a_form)
protected

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

References $id, PHPMailer\PHPMailer\$options, $title, ilPropertyFormGUI\addItem(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), and ilFormPropertyGUI\setRequired().

429  {
430  // always existing prtft
431  $hi = new ilHiddenInputGUI("target");
432  $hi->setValue("old");
433  $a_form->addItem($hi);
434 
435  $options = array();
437  foreach ($all as $id => $title) {
438  $options[$id] = $title;
439  }
440  $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
441  $prtf->setRequired(true);
442  $prtf->setOptions($options);
443  $a_form->addItem($prtf);
444  }
This class represents a selection list property in a property form.
if(!array_key_exists('StateId', $_REQUEST)) $id
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a hidden form property in a property form.
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 263 of file class.ilObjPortfolioTemplateGUI.php.

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

264  {
266 
267  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
269  if (sizeof($all)) {
270  $opts = array("" => $this->lng->txt("please_select"));
271  foreach ($all as $item) {
272  $opts[$item["id"]] = $item["title"];
273  }
274  $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
275  $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
276  $prtf->setOptions($opts);
277  $a_form->addItem($prtf);
278  }
279 
280  // yeah, I know.
281  return $a_form;
282  }
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.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjPortfolioTemplateGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

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

299  {
300  $obj_service = $this->object_service;
301  // activation/availability
302 
303  include_once "Services/Object/classes/class.ilObjectActivation.php";
304  $this->lng->loadLanguageModule('rep');
305 
307  $section->setTitle($this->lng->txt('rep_activation_availability'));
308  $a_form->addItem($section);
309 
310  // additional info only with multiple references
311  $act_obj_info = $act_ref_info = "";
312  if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
313  $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
314  $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
315  }
316 
317  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
318  $online->setInfo($this->lng->txt('prtt_activation_online_info') . $act_obj_info);
319  $a_form->addItem($online);
320 
321  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
322  $dur = new ilDateDurationInputGUI($this->lng->txt("rep_visibility_until"), "access_period");
323  $dur->setShowTime(true);
324  $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
325  $a_form->addItem($dur);
326 
327  $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'access_visiblity');
328  $visible->setInfo($this->lng->txt('prtt_activation_limited_visibility_info'));
329  $dur->addSubItem($visible);
330 
332  $section->setTitle($this->lng->txt('obj_presentation'));
333  $a_form->addItem($section);
334 
335  // tile image
336  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
337 
338 
339  parent::initEditCustomForm($a_form);
340 
341  $tit = $a_form->getItemByPostVar("title");
342  $tit->setInfo($this->lng->txt('prtt_title_info'));
343  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
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).
static _getAllReferences($a_id)
get all reference ids of object
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:83
input GUI for a time span (start and end date)
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 507 of file class.ilObjPortfolioTemplateGUI.php.

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

Referenced by executeCommand().

508  {
509  if (!$this->checkPermissionBool("write") &&
510  $this->checkPermissionBool("read")) {
511  $this->lng->loadLanguageModule("cntr");
512 
513  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
514  $button = ilLinkButton::getInstance();
515  $button->setPrimary(true);
516  $button->setCaption("prtf_create_portfolio_from_template");
517  $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
518  $this->tpl->setHeaderActionMenu($button->render());
519  }
520 
521  return parent::preview($a_return, $a_content, $a_show_notes);
522  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$a_content
Definition: workflow.php:93
+ 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 479 of file class.ilObjPortfolioTemplateGUI.php.

References $form, ilObject2GUI\checkPermissionBool(), getPageInstance(), initBlogForm(), and ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE.

480  {
481  $form = $this->initBlogForm();
482  if ($form->checkInput() && $this->checkPermissionBool("write")) {
483  $page = $this->getPageInstance();
485  $page->setTitle($form->getInput("blog"));
486  $page->create();
487 
488  ilUtil::sendSuccess($this->lng->txt("prtf_blog_page_created"), true);
489  $this->ctrl->redirect($this, "view");
490  }
491 
492  $this->tabs_gui->clearTargets();
493  $this->tabs_gui->setBackTarget(
494  $this->lng->txt("back"),
495  $this->ctrl->getLinkTarget($this, "view")
496  );
497 
498  $form->setValuesByPost();
499  $this->tpl->setContent($form->getHtml());
500  }
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.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ setTabs()

ilObjPortfolioTemplateGUI::setTabs ( )
protected

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

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

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

References ilObjectGUI\$object_service, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), and IL_CAL_UNIX.

360  {
361  $obj_service = $this->object_service;
362 
363  $this->object->setOnline($a_form->getInput("online"));
364 
365  // activation
366  $period = $a_form->getItemByPostVar("access_period");
367  if ($period->getStart() && $period->getEnd()) {
368  $this->object->setActivationLimited(true);
369  $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
370  $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
371  $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
372  } else {
373  $this->object->setActivationLimited(false);
374  }
375 
376  parent::updateCustom($a_form);
377 
378  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
379  }
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:

Field Documentation

◆ $help

ilObjPortfolioTemplateGUI::$help
protected

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

Referenced by setTabs().

◆ $nav_history

ilObjPortfolioTemplateGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $tabs

ilObjPortfolioTemplateGUI::$tabs
protected

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

Referenced by infoScreenForward().


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