ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCertificateMigrationInteraction Class Reference

Class ilCertificateMigrationInteraction. More...

+ Inheritance diagram for ilCertificateMigrationInteraction:
+ Collaboration diagram for ilCertificateMigrationInteraction:

Public Member Functions

 getInputTypes ()
 
 getOutputType ()
 
 getRemoveOption ()
 @inheritDoc More...
 
 getOptions (array $input)
 
 interaction (array $input, \ILIAS\BackgroundTasks\Task\UserInteraction\Option $user_selected_option, \ILIAS\BackgroundTasks\Bucket $bucket)
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
 getMessage (array $input)
 @inheritDoc More...
 
 canBeSkipped (array $input)
 @inheritDoc More...
 
 getSkippedValue (array $input)
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
 setInput (array $values)
 
 getOutput ()
 
 getInput ()
 
 getType ()
 
 unfoldTask ()
 Unfold the task. More...
 
 getRemoveOption ()
 
Returns
Option An Option to remove the current task and do some cleanup if possible. This Option is displayed if the Bucket is completed. You do not have to provide an additional Option to remove in your UserInteraction, the remove-Option is added to the list of Options (last position)
See also
self::getAbortOption();
More...
 
 getAbortOption ()
 
Returns
Option In case a Job is failed or did not respond for some time, an Abort-Option is displayed. There is already a Standard-Abort-Option registered, you can override with your own and do some cleanup if possible.
More...
 
 getType ()
 
 getInputTypes ()
 
 getOutputType ()
 
 getOutput ()
 
 setInput (array $values)
 
 getInput ()
 
 unfoldTask ()
 
 getRemoveOption ()
 
 getAbortOption ()
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Task\UserInteraction
 getOptions (array $input)
 
 canBeSkipped (array $input)
 Decide whether the UserInteraction is presented to the user and he has to decide or user UserInteraction is skipped by the TaskManager. More...
 
 getSkippedValue (array $input)
 
 interaction (array $input, Option $user_selected_option, Bucket $bucket)
 
 getMessage (array $input)
 

Data Fields

const OPTION_GOTO_LIST = 'listCertificates'
 
const OPTION_CANCEL = 'cancel'
 
- Data Fields inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
const MAIN_REMOVE = 'bt_main_remove'
 
const MAIN_ABORT = 'bt_main_abort'
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
 checkTypes ($values)
 
 extractType ($value)
 
- Protected Attributes inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
 $input = []
 
 $output
 

Detailed Description

Member Function Documentation

◆ getInputTypes()

ilCertificateMigrationInteraction::getInputTypes ( )
Returns
array|\ILIAS\BackgroundTasks\Types\Type[]

Implements ILIAS\BackgroundTasks\Task.

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

23 : array
24 {
25 return [
26 new SingleType(IntegerValue::class),
27 new SingleType(IntegerValue::class),
28 ];
29 }

◆ getOptions()

ilCertificateMigrationInteraction::getOptions ( array  $input)
Parameters
array$input
Returns
array|\ILIAS\BackgroundTasks\Task\UserInteraction\Option[]

Implements ILIAS\BackgroundTasks\Task\UserInteraction.

Reimplemented in ilCertificateMigrationReducedInteraction.

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

51 : array
52 {
53 return [
54 new UserInteractionOption('my_certificates', self::OPTION_GOTO_LIST),
55 ];
56 }

◆ getOutputType()

ilCertificateMigrationInteraction::getOutputType ( )
Returns
SingleType|\ILIAS\BackgroundTasks\Types\Type

Implements ILIAS\BackgroundTasks\Task.

Definition at line 34 of file class.ilCertificateMigrationInteraction.php.

35 {
36 return new SingleType(StringValue::class);
37 }

◆ getRemoveOption()

ilCertificateMigrationInteraction::getRemoveOption ( )

@inheritDoc

Reimplemented from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask.

Definition at line 42 of file class.ilCertificateMigrationInteraction.php.

43 {
44 return new UserInteractionOption('remove', self::OPTION_CANCEL);
45 }

◆ interaction()

ilCertificateMigrationInteraction::interaction ( array  $input,
\ILIAS\BackgroundTasks\Task\UserInteraction\Option  $user_selected_option,
\ILIAS\BackgroundTasks\Bucket  $bucket 
)
Parameters
array$input
\ILIAS\BackgroundTasks\Task\UserInteraction\Option$user_selected_option
\ILIAS\BackgroundTasks\Bucket$bucket
Returns
array|\ILIAS\BackgroundTasks\Value

Reimplemented in ilCertificateMigrationReducedInteraction.

Definition at line 64 of file class.ilCertificateMigrationInteraction.php.

65 {
66 global $DIC;
67
68 $progress = $input[0]->getValue();
69 $user_id = $input[1]->getValue();
70 $logger = $DIC->logger()->cert();
71
72 $logger->debug('User interaction certificate migration for user with id: ' . $user_id);
73 $logger->debug('User interaction certificate migration State: ' . $bucket->getState());
74 if ($user_selected_option->getValue() != self::OPTION_GOTO_LIST) {
75 $logger->info('User interaction certificate migration canceled for user with id: ' . $user_id);
76 return $input;
77 }
78
79 $DIC->ctrl()->redirectByClass([
80 'ilPersonalDesktopGUI',
81 'ilAchievementsGUI',
82 'ilUserCertificateGUI'
83 ], 'listCertificates');
84
85 return $input;
86 }
global $DIC
Definition: saml.php:7

References $DIC, and ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input.

Field Documentation

◆ OPTION_CANCEL

const ilCertificateMigrationInteraction::OPTION_CANCEL = 'cancel'

Definition at line 18 of file class.ilCertificateMigrationInteraction.php.

◆ OPTION_GOTO_LIST

const ilCertificateMigrationInteraction::OPTION_GOTO_LIST = 'listCertificates'

Definition at line 17 of file class.ilCertificateMigrationInteraction.php.


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