ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjPortfolioTemplateGUI Class Reference

Portfolio template view gui class. More...

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

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 infoScreen ()
 this one is called from the info button in the repository More...
 
 infoScreenForward ()
 
 edit ()
 
 getPageGUIClassName ()
 
 preview (bool $a_return=false, $a_content=false, bool $a_show_notes=true)
 
 createFromTemplateOld ()
 
 createFromTemplate ()
 
- Public Member Functions inherited from ilObjPortfolioBaseGUI
 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 setAdditional (array $a_additional)
 Set Additonal Information (used in public profile?) More...
 
 getAdditional ()
 
 setPermaLink (int $a_obj_id, string $a_type)
 Set custom perma link (used in public profile?) More...
 
 getPageGUIClassName ()
 
 view ()
 Show list of portfolio pages. More...
 
 initPageForm (string $a_mode="create")
 Init portfolio page form. More...
 
 savePage ()
 Create new portfolio page. More...
 
 savePortfolioPagesOrdering ()
 Save ordering of portfolio pages. More...
 
 confirmPortfolioPageDeletion ()
 
 deletePortfolioPages ()
 
 export (bool $a_with_comments=false)
 
 exportWithComments ()
 
 copyPageForm (?ilPropertyFormGUI $a_form=null)
 Select target portfolio for page(s) copy. More...
 
 copyPage ()
 
 initCopyPageForm ()
 
 setContentStyleSheet (?ilGlobalTemplateInterface $a_tpl=null)
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 setTabs ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 Get portfolio template page instance. More...
 
 getPageGUIInstance (int $a_page_id)
 Get portfolio template page gui instance. More...
 
 initCopyPageFormOptions (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from ilObjPortfolioBaseGUI
 addLocatorItems ()
 
 determinePageCall ()
 
 handlePageCall (string $a_cmd)
 
 setSettingsSubTabs (string $a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 getPageInstance (?int $a_page_id=null, ?int $a_portfolio_id=null)
 
 getPageGUIInstance (int $a_page_id)
 
 addPage ()
 Show portfolio page creation form. More...
 
 getCurrentPage ()
 
 getCommentGUI ()
 
 showEditButton (int $page_id)
 
 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ilNavigationHistory $nav_history
 
ilHelpGUI $help
 
ilTabsGUI $tabs
 
- Protected Attributes inherited from ilObjPortfolioBaseGUI
ILIAS Notes Service $notes
 
ILIAS Portfolio InternalGUIService $gui
 
StandardGUIRequest $port_request
 
ilHelpGUI $help
 
int $user_id = 0
 
array $additional = array()
 
array $perma_link = []
 
int $page_id = 0
 
string $page_mode
 
int $requested_ppage
 
int $requested_user_page
 
string $requested_back_url = ""
 
ILIAS DI UIServices $ui
 
ILIAS HTTP Services $http
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjPortfolioBaseGUI
static renderFullscreenHeader (ilObjPortfolioBase $a_portfolio, ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

43  {
44  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
45  global $DIC;
46 
47  $this->nav_history = $DIC["ilNavigationHistory"];
48  $this->help = $DIC["ilHelp"];
49  $this->tabs = $DIC->tabs();
50  $this->toolbar = $DIC->toolbar();
51  $this->user = $DIC->user();
52  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ createFromTemplate()

ilObjPortfolioTemplateGUI::createFromTemplate ( )

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

References ilObject2GUI\$access, ilObject2GUI\$ctrl, $DIC, ilObjectGUI\$id, ilObjectGUI\$ref_id, ilRBACAccessHandler\checkAccess(), ILIAS\Repository\ctrl(), ILIAS\Repository\object(), ilCtrl\redirectByClass(), and ilCtrl\setParameterByClass().

452  : void
453  {
454  $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
455  $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "createFromTemplateDirect");
456  }
+ Here is the call graph for this function:

◆ createFromTemplateOld()

ilObjPortfolioTemplateGUI::createFromTemplateOld ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

446  : void
447  {
448  $this->ctrl->setParameterByClass("ilobjportfoliogui", "prtt_pre", $this->object->getId());
449  $this->ctrl->redirectByClass(array("ilDashboardGUI", "ilportfoliorepositorygui", "ilobjportfoliogui"), "create");
450  }
+ Here is the call graph for this function:

◆ edit()

ilObjPortfolioTemplateGUI::edit ( )

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

References ILIAS\Repository\ctrl().

309  : void
310  {
311  $this->ctrl->redirectByClass(SettingsGUI::class);
312  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjPortfolioTemplateGUI::executeCommand ( )

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

References ilObjPortfolioBaseGUI\$gui, $nav_history, ilObjectGUI\$ref_id, ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjPortfolioBaseGUI\determinePageCall(), ilObject2GUI\executeCommand(), ilObject2GUI\getAccessHandler(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjPortfolioBaseGUI\handlePageCall(), infoScreenForward(), null, ILIAS\Repository\object(), ilObject2GUI\prepareOutput(), preview(), and ilObjPortfolioBaseGUI\setSettingsSubTabs().

59  : void
60  {
61  $ilNavigationHistory = $this->nav_history;
62 
63  // add entry to navigation history
64  if (!$this->getCreationMode() &&
65  $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
66  $link = $this->ctrl->getLinkTarget($this, "view");
67  $ilNavigationHistory->addItem($this->node_id, $link, "prtt");
68  }
69 
70  $next_class = $this->ctrl->getNextClass($this);
71  $cmd = $this->ctrl->getCmd("view");
72  switch ($next_class) {
73  case 'ilportfoliotemplatepagegui':
74  $this->determinePageCall(); // has to be done before locator!
75  $this->prepareOutput();
76  $this->handlePageCall($cmd);
77  break;
78 
79  case "ilcommentgui":
80  $this->preview();
81  break;
82 
83  case "ilinfoscreengui":
84  $this->prepareOutput();
85  $this->addHeaderAction();
86  $this->infoScreenForward();
87  break;
88 
89  case "ilcommonactiondispatchergui":
91  $this->prepareOutput();
92  $this->ctrl->forwardCommand($gui);
93  break;
94 
95  case "ilpermissiongui":
96  $this->prepareOutput();
97  $this->tabs_gui->activateTab("id_permissions");
98  $perm_gui = new ilPermissionGUI($this);
99  $this->ctrl->forwardCommand($perm_gui);
100  break;
101 
102  case "ilobjectcopygui":
103  $this->prepareOutput();
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  $exp_gui = new ilExportGUI($this);
113  $exp_gui->addFormat("xml");
114  $this->ctrl->forwardCommand($exp_gui);
115  break;
116 
117  case "ilobjectcontentstylesettingsgui":
118  $this->checkPermission("write");
119  $this->prepareOutput();
120  $this->addHeaderAction();
121  $this->tabs_gui->activateTab("settings");
122  $this->setSettingsSubTabs("style");
123  $settings_gui = $this->content_style_gui
124  ->objectSettingsGUIForRefId(
125  null,
126  $this->object->getRefId()
127  );
128  $this->ctrl->forwardCommand($settings_gui);
129  break;
130 
131  case "ilobjectmetadatagui":
132  $this->checkPermission("write");
133  $this->prepareOutput();
134  $this->addHeaderAction();
135  $this->tabs_gui->activateTab("advmd");
136  $md_gui = new ilObjectMetaDataGUI($this->object, "pfpg");
137  $this->ctrl->forwardCommand($md_gui);
138  break;
139 
140  case strtolower(SettingsGUI::class):
141  $this->checkPermission("write");
142  $this->prepareOutput();
143  $this->addHeaderAction();
144  $this->tabs_gui->activateTab("settings");
145  $this->setSettingsSubTabs("properties");
146  $gui = $this->gui->settings()->settingsGUI(
147  $this->object->getId(),
148  true,
150  );
151  $this->ctrl->forwardCommand($gui);
152  break;
153 
154  default:
155  $this->addHeaderAction();
157  }
158  }
Class ilObjectMetaDataGUI.
executeCommand()
execute command
ILIAS Portfolio InternalGUIService $gui
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
preview(bool $a_return=false, $a_content=false, bool $a_show_notes=true)
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 314 of file class.ilObjPortfolioTemplateGUI.php.

References ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, IL_CAL_UNIX, null, and ILIAS\Repository\object().

314  : void
315  {
316  $a_values["online"] = $this->object->isOnline();
317  $a_values["access_period"]["start"] = $this->object->getActivationStartDate()
318  ? new ilDateTime($this->object->getActivationStartDate(), IL_CAL_UNIX)
319  : null;
320  $a_values["access_period"]["end"] = $this->object->getActivationEndDate()
321  ? new ilDateTime($this->object->getActivationEndDate(), IL_CAL_UNIX)
322  : null;
323  $a_values["access_visiblity"] = $this->object->getActivationVisibility();
324 
325  $a_values['cont_custom_md'] = ilContainer::_lookupContainerSetting(
326  $this->object->getId(),
328  false
329  );
330 
331  parent::getEditFormCustomValues($a_values);
332  }
const IL_CAL_UNIX
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
+ Here is the call graph for this function:

◆ getPageGUIClassName()

ilObjPortfolioTemplateGUI::getPageGUIClassName ( )

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

400  : string
401  {
402  return "ilportfoliotemplatepagegui";
403  }

◆ getPageGUIInstance()

ilObjPortfolioTemplateGUI::getPageGUIInstance ( int  $a_page_id)
protected

Get portfolio template page gui instance.

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

References ilObjPortfolioBaseGUI\getAdditional(), ILIAS\Repository\object(), and ilPortfolioPageGUI\setAdditional().

390  $page_gui = new ilPortfolioTemplatePageGUI(
391  $this->object->getId(),
392  $a_page_id,
393  0,
394  $this->object->hasPublicComments()
395  );
396  $page_gui->setAdditional($this->getAdditional());
397  return $page_gui;
398  }
setAdditional(array $a_additional)
Set Additonal Information.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getPageInstance()

ilObjPortfolioTemplateGUI::getPageInstance ( ?int  $a_page_id = null,
?int  $a_portfolio_id = null 
)
protected

Get portfolio template page instance.

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

References ilPageObject\getId().

376  if (!$a_portfolio_id && $this->object) {
377  $a_portfolio_id = $this->object->getId();
378  }
379  $page = new ilPortfolioTemplatePage((int) $a_page_id);
380  $page->setPortfolioId($a_portfolio_id);
381  return $page;
382  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getType()

ilObjPortfolioTemplateGUI::getType ( )

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

54  : string
55  {
56  return "prtt";
57  }

◆ infoScreen()

ilObjPortfolioTemplateGUI::infoScreen ( )

this one is called from the info button in the repository

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

References ILIAS\Repository\ctrl().

221  : void
222  {
223  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
224  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjPortfolioTemplateGUI::infoScreenForward ( )

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

References $tabs, ilObject2GUI\$toolbar, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by executeCommand().

226  : void
227  {
228  $ilTabs = $this->tabs;
229  $ilToolbar = $this->toolbar;
230 
231  $ilTabs->activateTab("id_info");
232 
233  $this->checkPermission("visible");
234 
235  if ($this->checkPermissionBool("read")) {
236  $this->lng->loadLanguageModule("cntr");
237 
238  $this->gui->button(
239  $this->lng->txt("prtf_create_portfolio_from_template"),
240  $this->ctrl->getLinkTarget($this, "createfromtemplate")
241  )->primary()->toToolbar();
242  }
243 
244  $info = new ilInfoScreenGUI($this);
245 
246  $info->enablePrivateNotes();
247 
248  if ($this->checkPermissionBool("read")) {
249  $info->enableNews();
250  }
251 
252  // no news editing for files, just notifications
253  $info->enableNewsEditing(false);
254  if ($this->checkPermissionBool("write")) {
255  $news_set = new ilSetting("news");
256  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
257 
258  if ($enable_internal_rss) {
259  $info->setBlockProperty("news", "settings", true);
260  $info->setBlockProperty("news", "public_notifications_option", true);
261  }
262  }
263 
264  // standard meta data
265  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
266 
267  $this->ctrl->forwardCommand($info);
268  }
ilToolbarGUI $toolbar
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ 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 405 of file class.ilObjPortfolioTemplateGUI.php.

References ilObjectGUI\$id, ilPropertyFormGUI\addItem(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setRequired().

405  : void
406  {
407  // always existing prtft
408  $hi = new ilHiddenInputGUI("target");
409  $hi->setValue("old");
410  $a_form->addItem($hi);
411 
412  $options = array();
414  foreach ($all as $id => $title) {
415  $options[$id] = $title;
416  }
417  $prtf = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtf");
418  $prtf->setRequired(true);
419  $prtf->setOptions($options);
420  $a_form->addItem($prtf);
421  }
This class represents a selection list property in a property form.
static getAvailablePortfolioTemplates(string $a_permission="read")
This class represents a hidden form property in a property form.
setRequired(bool $a_required)
+ Here is the call graph for this function:

◆ initDidacticTemplate()

ilObjPortfolioTemplateGUI::initDidacticTemplate ( ilPropertyFormGUI  $form)
protected

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

References ilObject2GUI\$user, ilPropertyFormGUI\addItem(), ilObjectGUI\afterSave(), ilObjPortfolioBase\clonePagesAndSettings(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObjPortfolio\getPortfoliosOfUser(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setInfo().

276  {
277  $ilUser = $this->user;
278 
279  $all = ilObjPortfolio::getPortfoliosOfUser($ilUser->getId());
280  if (count($all)) {
281  $opts = array("" => $this->lng->txt("please_select"));
282  foreach ($all as $item) {
283  $opts[$item["id"]] = $item["title"];
284  }
285  $prtf = new ilSelectInputGUI($this->lng->txt("prtf_create_template_from_portfolio"), "prtf");
286  $prtf->setInfo($this->lng->txt("prtf_create_template_from_portfolio_info"));
287  $prtf->setOptions($opts);
288  $form->addItem($prtf);
289  }
290 
291  return $form;
292  }
This class represents a selection list property in a property form.
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
+ Here is the call graph for this function:

◆ preview()

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

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

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\UI\examples\Symbol\Glyph\Preview\preview().

Referenced by executeCommand().

432  : string {
433  if (!$this->checkPermissionBool("write") &&
434  $this->checkPermissionBool("read")) {
435  $this->lng->loadLanguageModule("cntr");
436  $button = $this->gui->button(
437  $this->lng->txt("prtf_create_portfolio_from_template"),
438  $this->ctrl->getLinkTarget($this, "createfromtemplate")
439  )->primary();
440  $this->tpl->setHeaderActionMenu($button->render());
441  }
442 
443  return parent::preview($a_return, $a_content, $a_show_notes);
444  }
preview()
description: > Example for rendering a Preview Glyph.
Definition: preview.php:41
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjPortfolioTemplateGUI::setTabs ( )
protected

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

References $help, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilHelpGUI\setScreenIdComponent(), and ilObject2GUI\setTabs().

160  : void
161  {
162  $ilHelp = $this->help;
163 
164  $ilHelp->setScreenIdComponent("prtt");
165 
166  if ($this->checkPermissionBool("write")) {
167  $this->tabs_gui->addTab(
168  "pages",
169  $this->lng->txt("content"),
170  $this->ctrl->getLinkTarget($this, "view")
171  );
172  }
173 
174  if ($this->checkPermissionBool("read")) {
175  $this->tabs_gui->addTab(
176  "id_info",
177  $this->lng->txt("info_short"),
178  $this->ctrl->getLinkTargetByClass(array("ilobjportfoliotemplategui", "ilinfoscreengui"), "showSummary")
179  );
180  }
181 
182  if ($this->checkPermissionBool("write")) {
183  $this->tabs_gui->addTab(
184  "settings",
185  $this->lng->txt("settings"),
186  $this->ctrl->getLinkTargetByClass(SettingsGUI::class)
187  );
188 
189  $mdgui = new ilObjectMetaDataGUI($this->object, "pfpg");
190  $mdtab = $mdgui->getTab();
191  if ($mdtab) {
192  $this->tabs_gui->addTab(
193  "advmd",
194  $this->lng->txt("meta_data"),
195  $mdtab
196  );
197  }
198 
199  $this->tabs_gui->addTab(
200  "export",
201  $this->lng->txt("export"),
202  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
203  );
204  }
205 
206  if ($this->checkPermissionBool("read")) {
207  $this->tabs_gui->addNonTabbedLink(
208  "preview",
209  $this->lng->txt("preview"),
210  $this->ctrl->getLinkTarget($this, "preview")
211  );
212  }
213 
214  // will add permissions if needed
216  }
Class ilObjectMetaDataGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
setScreenIdComponent(string $a_comp)
setTabs()
create tabs (repository/workspace switch)
+ Here is the call graph for this function:

◆ updateCustom()

ilObjPortfolioTemplateGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

References ilObjectGUI\$object_service, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

334  : void
335  {
336  $obj_service = $this->object_service;
337 
338  $this->object->setOnline($form->getInput("online"));
339 
340  // activation
341  $period = $form->getItemByPostVar("access_period");
342  if ($period->getStart() && $period->getEnd()) {
343  $this->object->setActivationLimited(true);
344  $this->object->setActivationVisibility($form->getInput("access_visiblity"));
345  $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
346  $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
347  } else {
348  $this->object->setActivationLimited(false);
349  }
350 
351  parent::updateCustom($form);
352 
353  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
354 
356  $this->object->getId(),
357  $form,
358  array(
360  )
361  );
362  }
getItemByPostVar(string $a_post_var)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const IL_CAL_UNIX
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
ilObjectService $object_service
+ Here is the call graph for this function:

Field Documentation

◆ $help

ilHelpGUI ilObjPortfolioTemplateGUI::$help
protected

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

Referenced by setTabs().

◆ $nav_history

ilNavigationHistory ilObjPortfolioTemplateGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $tabs

ilTabsGUI ilObjPortfolioTemplateGUI::$tabs
protected

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

Referenced by infoScreenForward().


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