ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjEmployeeTalkSeriesGUI Class Reference

Class ilObjEmployeeTalkGUI. More...

+ Inheritance diagram for ilObjEmployeeTalkSeriesGUI:
+ Collaboration diagram for ilObjEmployeeTalkSeriesGUI:

Public Member Functions

 __construct ()
 
 setLinkToParentGUI (string $link)
 
 redirectToParentGUI ()
 
 executeCommand ()
 
 cancelObject ()
 
 saveObject ()
 
 viewObject ()
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 
 competencesObject ()
 
- 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)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto (string $refId)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path 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)
 

Protected Member Functions

 setTitleAndDescription ()
 This GUI is only called when creating a talk (series). More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 Talk Series does not use RBAC and therefore does not require the usual permission checks. More...
 
 initCreateForm (string $new_type)
 
 getTabs ()
 
 loadRecurrenceSettings ()
 load recurrence settings More...
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (?ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 
- 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

MetadataHandlerInterface $md_handler
 
NotificationHandlerInterface $notif_handler
 
ilPropertyFormGUI $form
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 
- 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 = ""
 

Private Member Functions

 checkAccessOrFail ()
 
 sendNotification (ilObjEmployeeTalk ... $talks)
 
 copyTemplateValues (ilObjEmployeeTalkSeries $talk)
 Copy the template values, into the talk series object. More...
 
 getTemplateRefId ()
 

Private Attributes

ILIAS DI Container $container
 
int $userId = -1
 
string $link_to_parent
 

Additional Inherited Members

- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 
- 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()

ilObjEmployeeTalkSeriesGUI::__construct ( )

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

References $DIC, $refId, ILIAS\GlobalScreen\Provider\__construct(), ilObjectGUI\omitLocator(), and ilObjEmployeeTalkSeries\TYPE.

57  {
58  global $DIC;
59 
60  $this->container = $DIC;
61 
62  $refId = $this->container
63  ->http()
64  ->wrapper()
65  ->query()
66  ->retrieve("ref_id", $this->container->refinery()->kindlyTo()->int());
67 
68  parent::__construct([], $refId, true, false);
69  $this->container->language()->loadLanguageModule('mst');
70  $this->container->language()->loadLanguageModule('trac');
71  $this->container->language()->loadLanguageModule('etal');
72  $this->container->language()->loadLanguageModule('dateplaner');
73 
74  $this->type = ilObjEmployeeTalkSeries::TYPE;
75 
76  $wrapper = $this->container->http()->wrapper()->query();
77 
78  if ($wrapper->has('usr_id')) {
79  $this->userId = $wrapper->retrieve('usr_id', $this->container->refinery()->kindlyTo()->int());
80  }
81 
82  $this->md_handler = new MetadataHandler();
83  $this->notif_handler = new NotificationHandler(new VCalendarGenerator($this->container->language()));
84 
85  $this->omitLocator();
86  }
omitLocator(bool $omit=true)
$refId
Definition: xapitoken.php:58
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjEmployeeTalkSeriesGUI::_goto ( string  $refId)
static

Definition at line 556 of file class.ilObjEmployeeTalkSeriesGUI.php.

References $DIC.

556  : void
557  {
558  global $DIC;
559 
560  $children = $DIC->repositoryTree()->getChildIds((int) $refId);
561 
562  /*
563  * If the series contains talks, redirect to first talk,
564  * if not (which should only happen if someone messes with
565  * the URL) redirect to dashboard.
566  */
567  if (empty($children)) {
568  $DIC->ui()->mainTemplate()->setOnScreenMessage(
569  'failure',
570  $DIC->language()->txt("permission_denied"),
571  true
572  );
573  $DIC->ctrl()->redirectByClass(ilDashboardGUI::class, "");
574  }
575  ilObjEmployeeTalkGUI::_goto((string) $children[0]);
576  }
$refId
Definition: xapitoken.php:58
global $DIC
Definition: shib_login.php:22

◆ cancelObject()

ilObjEmployeeTalkSeriesGUI::cancelObject ( )

Definition at line 172 of file class.ilObjEmployeeTalkSeriesGUI.php.

References ilObjectGUI\afterSave(), copyTemplateValues(), ILIAS\Repository\lng(), loadRecurrenceSettings(), and redirectToParentGUI().

172  : void
173  {
174  $this->redirectToParentGUI();
175  }
+ Here is the call graph for this function:

◆ checkAccessOrFail()

ilObjEmployeeTalkSeriesGUI::checkAccessOrFail ( )
private

Definition at line 88 of file class.ilObjEmployeeTalkSeriesGUI.php.

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

Referenced by executeCommand().

88  : void
89  {
90  $talkAccess = new ilObjEmployeeTalkAccess();
91  if (!$talkAccess->canCreate()) {
92  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
93  $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
94  }
95  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPermissionBool()

ilObjEmployeeTalkSeriesGUI::checkPermissionBool ( string  $perm,
string  $cmd = "",
string  $type = "",
?int  $ref_id = null 
)
protected

Talk Series does not use RBAC and therefore does not require the usual permission checks.

Talk series it self can no longer be edited after creation.

Definition at line 164 of file class.ilObjEmployeeTalkSeriesGUI.php.

164  : bool
165  {
166  if ($perm === 'create') {
167  return true;
168  }
169  return false;
170  }

◆ copyTemplateValues()

ilObjEmployeeTalkSeriesGUI::copyTemplateValues ( ilObjEmployeeTalkSeries  $talk)
private

Copy the template values, into the talk series object.

Parameters
ilObjEmployeeTalkSeries$talk

Definition at line 468 of file class.ilObjEmployeeTalkSeriesGUI.php.

References ilObjectGUI\$data, ILIAS\Repository\form(), ilCalendarRecurrence\getFrequenceType(), ilObject\getId(), ilObject\getRefId(), getTemplateRefId(), ilObject\getType(), IL_CAL_UNIX, IL_CAL_YEAR, sendNotification(), ilObject\setDescription(), ilObjEmployeeTalk\TYPE, ilContainer\update(), and ilTimeZone\UTC.

Referenced by cancelObject().

469  {
470  $template = new ilObjTalkTemplate($this->getTemplateRefId(), true);
471  $talk->setDescription($template->getTitle());
472  $talk->update();
473 
474  $this->md_handler->copyValues(
475  $template->getType(),
476  $template->getId(),
477  $talk->getType(),
478  $talk->getId(),
480  );
481  }
setDescription(string $description)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjEmployeeTalkSeriesGUI::executeCommand ( )

If the performance of the autocomplete tanks, it's definitely because of calling canCreate separately for each user. It would be better to use: $DIC->access()->filterUserIdsByPositionOfCurrentUser( ilOrgUnitOperation::OP_CREATE_EMPLOYEE_TALK, Insert talk ref id here, $userIds ); but that function gets its context exclusively from the ref_id of an object, and at this point there might not even exist an object with type etal at all...

Definition at line 110 of file class.ilObjEmployeeTalkSeriesGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$id, and checkAccessOrFail().

110  : void
111  {
112  $this->checkAccessOrFail();
113 
114  // determine next class in the call structure
115  $next_class = $this->container->ctrl()->getNextClass($this);
116 
117  switch ($next_class) {
118  case strtolower(ilRepositorySearchGUI::class):
119  $repo = new ilRepositorySearchGUI();
120  $repo->addUserAccessFilterCallable(function ($user_ids) {
136  return array_filter(
137  $user_ids,
138  function (int $id) use ($access) {
139  return $access->canCreate(new ilObjUser($id));
140  }
141  );
142  });
143  $this->container->ctrl()->forwardCommand($repo);
144  break;
145  default:
146  parent::executeCommand();
147  }
148  }
addUserAccessFilterCallable(callable $user_filter)
Closure for filtering users e.g $rep_search_gui->addUserAccessFilterCallable(function($user_ids) use(...
ilAccessHandler $access
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjEmployeeTalkSeriesGUI::getAdminTabs ( )

Definition at line 318 of file class.ilObjEmployeeTalkSeriesGUI.php.

318  : void
319  {
320  }

◆ getTabs()

ilObjEmployeeTalkSeriesGUI::getTabs ( )
protected

Definition at line 314 of file class.ilObjEmployeeTalkSeriesGUI.php.

314  : void
315  {
316  }

◆ getTemplateRefId()

ilObjEmployeeTalkSeriesGUI::getTemplateRefId ( )
private

Definition at line 578 of file class.ilObjEmployeeTalkSeriesGUI.php.

References $refId, ilObjTalkTemplate\_exists(), ilObject\_lookupObjectId(), ILIAS\Repository\lng(), ilObject\lookupOfflineStatus(), and redirectToParentGUI().

Referenced by copyTemplateValues(), initCreateForm(), and loadRecurrenceSettings().

578  : int
579  {
580  $refId = 0;
581  if ($this->container->http()->wrapper()->query()->has('template')) {
582  $refId = $this->container->http()->wrapper()->query()->retrieve(
583  'template',
584  $this->container->refinery()->kindlyTo()->int()
585  );
586  }
587  if (
590  ) {
591  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('etal_create_invalid_template_ref'), true);
592  $this->redirectToParentGUI();
593  }
594 
595  return $refId;
596  }
$refId
Definition: xapitoken.php:58
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache.
static _exists(int $id, bool $reference=false, ?string $type=null)
static _lookupObjectId(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjEmployeeTalkSeriesGUI::initCreateForm ( string  $new_type)
protected

Definition at line 240 of file class.ilObjEmployeeTalkSeriesGUI.php.

References $form, $location, ilObjectGUI\$user, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjUser\getLogin(), getTemplateRefId(), ilObjectGUI\initDidacticTemplate(), ILIAS\Repository\lng(), ilTextAreaInputGUI\setCols(), ilFormGUI\setFormAction(), ilFormGUI\setTarget(), ilPropertyFormGUI\setTitle(), and ilObject\TITLE_LENGTH.

Referenced by saveObject().

241  {
242  $form = new ilPropertyFormGUI();
243  $form->setTarget("_top");
244  $form->setFormAction($this->ctrl->getFormAction($this, "save") . '&template=' . $this->getTemplateRefId());
245  $form->setTitle($this->lng->txt($new_type . "_new"));
246 
247  // title
248  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
249  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
250  $ti->setMaxLength(ilObject::TITLE_LENGTH);
251  $ti->setRequired(true);
252  $form->addItem($ti);
253 
254  // description
255  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
256  $ta->setCols(40);
257  $ta->setRows(2);
258  $form->addItem($ta);
259 
260  // Start & End Date
261  $dur = new ilDateDurationInputGUI($this->lng->txt('cal_fullday'), 'etal_event');
262  $dur->setRequired(true);
263  $dur->enableToggleFullTime(
264  $this->lng->txt('cal_fullday_title'),
265  false
266  );
267  $dur->setShowTime(true);
268  $form->addItem($dur);
269 
270  // Recurrence
271  $cal = new ilRecurrenceInputGUI("Calender", "frequence");
272  $event = new ilCalendarRecurrence();
273  //$event->setRecurrence(ilEventRecurrence::REC_EXCLUSION);
274  //$event->setFrequenceType(ilEventRecurrence::FREQ_DAILY);
275  $cal->allowUnlimitedRecurrences(false);
276  $cal->setRecurrence($event);
277  $form->addItem($cal);
278 
279  //Location
280  $location = new ilTextInputGUI("Location", "etal_location");
281  $location->setMaxLength(200);
283 
284  //Employee
285  $login = new ilTextInputGUI($this->lng->txt("employee"), "etal_employee");
286  $login->setRequired(true);
287  $login->setDataSource($this->ctrl->getLinkTargetByClass([
288  strtolower(self::class),
289  strtolower(ilRepositorySearchGUI::class)
290  ], 'doUserAutoComplete', '', true));
291 
292  if ($this->userId !== -1) {
293  $user = new ilObjUser($this->userId);
294  $login->setValue($user->getLogin());
295  }
296 
297  $form->addItem($login);
298 
299  $form = $this->initDidacticTemplate($form);
300 
301  $form->addCommandButton("save", $this->lng->txt($new_type . "_add"));
302  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
303 
304  $this->form = $form;
305 
306  return $form;
307  }
const TITLE_LENGTH
$location
Definition: buildRTE.php:22
This class represents an input GUI for recurring events/appointments (course events or calendar appoi...
Model of calendar entry recurrcences based on iCalendar-RFC-5545.
setTarget(string $a_target)
setFormAction(string $a_formaction)
initDidacticTemplate(ilPropertyFormGUI $form)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
form( $class_path, string $cmd, string $submit_caption="")
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRecurrenceSettings()

ilObjEmployeeTalkSeriesGUI::loadRecurrenceSettings ( )
protected

load recurrence settings

protected

Returns

Definition at line 333 of file class.ilObjEmployeeTalkSeriesGUI.php.

References $location, ilObject\_lookupObjectId(), ILIAS\Repository\form(), ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, getTemplateRefId(), ilObjUser\getUserIdByLogin(), IL_CAL_UNIX, null, ilUtil\stripSlashes(), and ilTimeZone\UTC.

Referenced by cancelObject().

334  {
335  $rec = new ilCalendarRecurrence();
336 
337  switch ($this->form->getInput('frequence')) {
339  $rec->setFrequenceType($this->form->getInput('frequence'));
340  $rec->setInterval((int) $this->form->getInput('count_DAILY'));
341  break;
342 
344  $rec->setFrequenceType($this->form->getInput('frequence'));
345  $rec->setInterval((int) $this->form->getInput('count_WEEKLY'));
346  if (is_array($this->form->getInput('byday_WEEKLY'))) {
347  $rec->setBYDAY(ilUtil::stripSlashes(implode(',', $this->form->getInput('byday_WEEKLY'))));
348  }
349  break;
350 
352  $rec->setFrequenceType($this->form->getInput('frequence'));
353  $rec->setInterval((int) $this->form->getInput('count_MONTHLY'));
354  switch ((int) $this->form->getInput('subtype_MONTHLY')) {
355  case 0:
356  // nothing to do;
357  break;
358 
359  case 1:
360  switch ((int) $this->form->getInput('monthly_byday_day')) {
361  case 8:
362  // Weekday
363  $rec->setBYSETPOS($this->form->getInput('monthly_byday_num'));
364  $rec->setBYDAY('MO,TU,WE,TH,FR');
365  break;
366 
367  case 9:
368  // Day of month
369  $rec->setBYMONTHDAY($this->form->getInput('monthly_byday_num'));
370  break;
371 
372  default:
373  $rec->setBYDAY(($this->form->getInput('monthly_byday_num') . $this->form->getInput('monthly_byday_day')));
374  break;
375  }
376  break;
377 
378  case 2:
379  $rec->setBYMONTHDAY($this->form->getInput('monthly_bymonthday'));
380  break;
381  }
382  break;
383 
385  $rec->setFrequenceType($this->form->getInput('frequence'));
386  $rec->setInterval((int) $this->form->getInput('count_YEARLY'));
387  switch ((int) $this->form->getInput('subtype_YEARLY')) {
388  case 0:
389  // nothing to do;
390  break;
391 
392  case 1:
393  $rec->setBYMONTH($this->form->getInput('yearly_bymonth_byday'));
394  $rec->setBYDAY(($this->form->getInput('yearly_byday_num') . $this->form->getInput('yearly_byday')));
395  break;
396 
397  case 2:
398  $rec->setBYMONTH($this->form->getInput('yearly_bymonth_by_monthday'));
399  $rec->setBYMONTHDAY($this->form->getInput('yearly_bymonthday'));
400  break;
401  }
402  break;
403  }
404 
405  // UNTIL
406  switch ((int) $this->form->getInput('until_type')) {
407  case 1:
408  $rec->setFrequenceUntilDate(null);
409  // nothing to do
410  break;
411 
412  case 2:
413  $rec->setFrequenceUntilDate(null);
414  $rec->setFrequenceUntilCount((int) $this->form->getInput('count'));
415  break;
416 
417  case 3:
418  $frequence = $this->form->getItemByPostVar('frequence');
419  $end = $frequence->getRecurrence()->getFrequenceUntilDate();
420  $rec->setFrequenceUntilCount(0);
421  $rec->setFrequenceUntilDate($end);
422  break;
423  }
424 
425  return $rec;
426  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Model of calendar entry recurrcences based on iCalendar-RFC-5545.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToParentGUI()

ilObjEmployeeTalkSeriesGUI::redirectToParentGUI ( )

Definition at line 102 of file class.ilObjEmployeeTalkSeriesGUI.php.

References ILIAS\Repository\ctrl().

Referenced by cancelObject(), and getTemplateRefId().

102  : void
103  {
104  if (isset($this->link_to_parent)) {
105  $this->ctrl->redirectToURL($this->link_to_parent);
106  }
107  $this->ctrl->redirectByClass(strtolower(ilEmployeeTalkMyStaffListGUI::class));
108  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilObjEmployeeTalkSeriesGUI::saveObject ( )

Definition at line 198 of file class.ilObjEmployeeTalkSeriesGUI.php.

References ilObjUser\_loginExists(), ilObjUser\_lookupId(), ilObjectGUI\afterSave(), ilPropertyFormGUI\checkInput(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), initCreateForm(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilObjectGUI\putObjectInTree(), and ilPropertyFormGUI\setValuesByPost().

198  : void
199  {
200  $this->ctrl->setParameter($this, "new_type", $this->requested_new_type);
201 
202  $form = $this->initCreateForm($this->requested_new_type);
203  if ($form->checkInput()) {
204  $userName = (string) $form->getInput('etal_employee');
205  $userId = (int) ilObjUser::_lookupId($userName);
206  $talkAccess = new ilObjEmployeeTalkAccess();
207  if (
208  !ilObjUser::_loginExists($userName) ||
209  !$talkAccess->canCreate(new ilObjUser($userId))
210  ) {
211  $form->getItemByPostVar('etal_employee')
212  ->setAlert($this->lng->txt('etal_invalid_user'));
213  $this->tpl->setOnScreenMessage(
214  'failure',
215  $this->lng->txt('form_input_not_valid')
216  );
218  $this->tpl->setContent($form->getHTML());
219  return;
220  }
221 
222  $this->ctrl->setParameter($this, "new_type", "");
223 
224  $class_name = "ilObj" . $this->obj_definition->getClassName($this->requested_new_type);
225  $newObj = new $class_name();
226  $newObj->setType($this->requested_new_type);
227  $newObj->setTitle($form->getInput("title"));
228  $newObj->setDescription($form->getInput("desc"));
229  $newObj->create();
230 
231  $this->putObjectInTree($newObj);
232 
233  $this->afterSave($newObj);
234  }
235 
237  $this->tpl->setContent($form->getHTML());
238  }
getItemByPostVar(string $a_post_var)
static _lookupId($a_user_str)
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-...
static _loginExists(string $a_login, int $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
afterSave(ilObject $new_object)
Post (successful) object creation hook.
putObjectInTree(ilObject $obj, ?int $parent_node_id=null)
Add object to tree at given position.
+ Here is the call graph for this function:

◆ sendNotification()

ilObjEmployeeTalkSeriesGUI::sendNotification ( ilObjEmployeeTalk ...  $talks)
private

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

Referenced by copyTemplateValues().

322  : void
323  {
324  $this->notif_handler->send(NotificationType::INVITATION, ...$talks);
325  }
+ Here is the caller graph for this function:

◆ setLinkToParentGUI()

ilObjEmployeeTalkSeriesGUI::setLinkToParentGUI ( string  $link)

Definition at line 97 of file class.ilObjEmployeeTalkSeriesGUI.php.

97  : void
98  {
99  $this->link_to_parent = $link;
100  }

◆ setTitleAndDescription()

ilObjEmployeeTalkSeriesGUI::setTitleAndDescription ( )
protected

This GUI is only called when creating a talk (series).

In the creation dialog, there should not be a header.

Definition at line 154 of file class.ilObjEmployeeTalkSeriesGUI.php.

154  : void
155  {
156  $this->tabs_gui->clearTargets();
157  $this->tpl->resetHeaderBlock();
158  }

◆ viewObject()

ilObjEmployeeTalkSeriesGUI::viewObject ( )

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

309  : void
310  {
311  self::_goto((string) $this->ref_id);
312  }

Field Documentation

◆ $container

ILIAS DI Container ilObjEmployeeTalkSeriesGUI::$container
private

Definition at line 49 of file class.ilObjEmployeeTalkSeriesGUI.php.

◆ $form

ilPropertyFormGUI ilObjEmployeeTalkSeriesGUI::$form
protected

Definition at line 52 of file class.ilObjEmployeeTalkSeriesGUI.php.

Referenced by initCreateForm().

◆ $link_to_parent

string ilObjEmployeeTalkSeriesGUI::$link_to_parent
private

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

◆ $md_handler

MetadataHandlerInterface ilObjEmployeeTalkSeriesGUI::$md_handler
protected

Definition at line 50 of file class.ilObjEmployeeTalkSeriesGUI.php.

◆ $notif_handler

NotificationHandlerInterface ilObjEmployeeTalkSeriesGUI::$notif_handler
protected

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

◆ $userId

int ilObjEmployeeTalkSeriesGUI::$userId = -1
private

Definition at line 53 of file class.ilObjEmployeeTalkSeriesGUI.php.


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