ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 getTabs ()
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 prepareOutput (bool $show_subobjects=true)
 
 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 ()
 
 getAsynchItemListObject ()
 
 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
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 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)
 
 initCreationForms ($new_type)
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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...
 

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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjEmployeeTalkSeriesGUI::__construct ( )

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

References $DIC, $refId, ILIAS\MetaData\Repository\Validation\Data\__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: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjEmployeeTalkSeriesGUI::_goto ( string  $refId)
static

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

References $DIC.

565  : void
566  {
567  global $DIC;
568 
569  $children = $DIC->repositoryTree()->getChildIds((int) $refId);
570 
571  /*
572  * If the series contains talks, redirect to first talk,
573  * if not (which should only happen if someone messes with
574  * the URL) redirect to dashboard.
575  */
576  if (empty($children)) {
577  $DIC->ui()->mainTemplate()->setOnScreenMessage(
578  'failure',
579  $DIC->language()->txt("permission_denied"),
580  true
581  );
582  $DIC->ctrl()->redirectByClass(ilDashboardGUI::class, "");
583  }
584  ilObjEmployeeTalkGUI::_goto((string) $children[0]);
585  }
$refId
Definition: xapitoken.php:58
global $DIC
Definition: feed.php:28

◆ 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 475 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().

476  {
477  $template = new ilObjTalkTemplate($this->getTemplateRefId(), true);
478  $talk->setDescription($template->getTitle());
479  $talk->update();
480 
481  $this->md_handler->copyValues(
482  $template->getType(),
483  $template->getId(),
484  $talk->getType(),
485  $talk->getId(),
487  );
488  }
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 325 of file class.ilObjEmployeeTalkSeriesGUI.php.

325  : void
326  {
327  }

◆ getTabs()

ilObjEmployeeTalkSeriesGUI::getTabs ( )

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

321  : void
322  {
323  }

◆ getTemplateRefId()

ilObjEmployeeTalkSeriesGUI::getTemplateRefId ( )
private

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

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

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

587  : int
588  {
589  $refId = 0;
590  if ($this->container->http()->wrapper()->query()->has('template')) {
591  $refId = $this->container->http()->wrapper()->query()->retrieve(
592  'template',
593  $this->container->refinery()->kindlyTo()->int()
594  );
595  }
596  if (
599  ) {
600  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('etal_create_invalid_template_ref'), true);
601  $this->redirectToParentGUI();
602  }
603 
604  return $refId;
605  }
$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 initCreationForms(), and 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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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:

◆ initCreationForms()

ilObjEmployeeTalkSeriesGUI::initCreationForms (   $new_type)
protected

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

References initCreateForm().

309  : array
310  {
311  return [
312  self::CFORM_NEW => $this->initCreateForm($new_type)
313  ];
314  }
+ Here is the call graph for this function:

◆ loadRecurrenceSettings()

ilObjEmployeeTalkSeriesGUI::loadRecurrenceSettings ( )
protected

load recurrence settings

protected

Returns

Definition at line 340 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, ilUtil\stripSlashes(), and ilTimeZone\UTC.

Referenced by cancelObject().

341  {
342  $rec = new ilCalendarRecurrence();
343 
344  switch ($this->form->getInput('frequence')) {
346  $rec->setFrequenceType($this->form->getInput('frequence'));
347  $rec->setInterval((int) $this->form->getInput('count_DAILY'));
348  break;
349 
351  $rec->setFrequenceType($this->form->getInput('frequence'));
352  $rec->setInterval((int) $this->form->getInput('count_WEEKLY'));
353  if (is_array($this->form->getInput('byday_WEEKLY'))) {
354  $rec->setBYDAY(ilUtil::stripSlashes(implode(',', $this->form->getInput('byday_WEEKLY'))));
355  }
356  break;
357 
359  $rec->setFrequenceType($this->form->getInput('frequence'));
360  $rec->setInterval((int) $this->form->getInput('count_MONTHLY'));
361  switch ((int) $this->form->getInput('subtype_MONTHLY')) {
362  case 0:
363  // nothing to do;
364  break;
365 
366  case 1:
367  switch ((int) $this->form->getInput('monthly_byday_day')) {
368  case 8:
369  // Weekday
370  $rec->setBYSETPOS($this->form->getInput('monthly_byday_num'));
371  $rec->setBYDAY('MO,TU,WE,TH,FR');
372  break;
373 
374  case 9:
375  // Day of month
376  $rec->setBYMONTHDAY($this->form->getInput('monthly_byday_num'));
377  break;
378 
379  default:
380  $rec->setBYDAY(($this->form->getInput('monthly_byday_num') . $this->form->getInput('monthly_byday_day')));
381  break;
382  }
383  break;
384 
385  case 2:
386  $rec->setBYMONTHDAY($this->form->getInput('monthly_bymonthday'));
387  break;
388  }
389  break;
390 
392  $rec->setFrequenceType($this->form->getInput('frequence'));
393  $rec->setInterval((int) $this->form->getInput('count_YEARLY'));
394  switch ((int) $this->form->getInput('subtype_YEARLY')) {
395  case 0:
396  // nothing to do;
397  break;
398 
399  case 1:
400  $rec->setBYMONTH($this->form->getInput('yearly_bymonth_byday'));
401  $rec->setBYDAY(($this->form->getInput('yearly_byday_num') . $this->form->getInput('yearly_byday')));
402  break;
403 
404  case 2:
405  $rec->setBYMONTH($this->form->getInput('yearly_bymonth_by_monthday'));
406  $rec->setBYMONTHDAY($this->form->getInput('yearly_bymonthday'));
407  break;
408  }
409  break;
410  }
411 
412  // UNTIL
413  switch ((int) $this->form->getInput('until_type')) {
414  case 1:
415  $rec->setFrequenceUntilDate(null);
416  // nothing to do
417  break;
418 
419  case 2:
420  $rec->setFrequenceUntilDate(null);
421  $rec->setFrequenceUntilCount((int) $this->form->getInput('count'));
422  break;
423 
424  case 3:
425  $frequence = $this->form->getItemByPostVar('frequence');
426  $end = $frequence->getRecurrence()->getFrequenceUntilDate();
427  $rec->setFrequenceUntilCount(0);
428  $rec->setFrequenceUntilDate($end);
429  break;
430  }
431 
432  return $rec;
433  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 329 of file class.ilObjEmployeeTalkSeriesGUI.php.

Referenced by copyTemplateValues().

329  : void
330  {
331  $this->notif_handler->send(NotificationType::INVITATION, ...$talks);
332  }
+ 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 316 of file class.ilObjEmployeeTalkSeriesGUI.php.

316  : void
317  {
318  self::_goto((string) $this->ref_id);
319  }

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: