ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLTIConsumeProviderSettingsGUI Class Reference
+ Collaboration diagram for ilLTIConsumeProviderSettingsGUI:

Public Member Functions

 __construct (ilObjLTIConsumer $object, ilLTIConsumerAccess $access)
 ilLTIConsumerAccess constructor. More...
 
 executeCommand ()
 Execute Command. More...
 

Data Fields

const CMD_SHOW_SETTINGS = 'showSettings'
 
const CMD_SAVE_SETTINGS = 'saveSettings'
 

Protected Member Functions

 showSettingsCmd (ilLTIConsumeProviderFormGUI $form=null)
 
 saveSettingsCmd ()
 
 buildForm (ilLTIConsumeProvider $provider)
 

Protected Attributes

 $object
 
 $access
 

Detailed Description

Definition at line 14 of file class.ilLTIConsumeProviderSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumeProviderSettingsGUI::__construct ( ilObjLTIConsumer  $object,
ilLTIConsumerAccess  $access 
)

ilLTIConsumerAccess constructor.

Parameters
ilObjLTIConsumer$object

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

References $access, and $object.

Member Function Documentation

◆ buildForm()

ilLTIConsumeProviderSettingsGUI::buildForm ( ilLTIConsumeProvider  $provider)
protected
Returns
ilLTIConsumeProviderFormGUI

Definition at line 84 of file class.ilLTIConsumeProviderSettingsGUI.php.

References $DIC.

Referenced by saveSettingsCmd(), and showSettingsCmd().

85  {
86  global $DIC; /* @var \ILIAS\DI\Container $DIC */
87 
88  $form = new ilLTIConsumeProviderFormGUI($provider);
89 
90  $form->initForm(
91  $DIC->ctrl()->getFormAction($this),
92  self::CMD_SAVE_SETTINGS,
93  self::CMD_SHOW_SETTINGS
94  );
95 
96  return $form;
97  }
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ executeCommand()

ilLTIConsumeProviderSettingsGUI::executeCommand ( )

Execute Command.

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

References $DIC.

43  {
44  global $DIC; /* @var \ILIAS\DI\Container $DIC */
45 
46  switch ($DIC->ctrl()->getNextClass()) {
47  default:
48 
49  $command = $DIC->ctrl()->getCmd(self::CMD_SHOW_SETTINGS) . 'Cmd';
50  $this->{$command}();
51  }
52  }
$DIC
Definition: xapitoken.php:46

◆ saveSettingsCmd()

ilLTIConsumeProviderSettingsGUI::saveSettingsCmd ( )
protected

Definition at line 65 of file class.ilLTIConsumeProviderSettingsGUI.php.

References $DIC, buildForm(), and showSettingsCmd().

66  {
67  global $DIC; /* @var \ILIAS\DI\Container $DIC */
68 
69  $form = $this->buildForm($this->object->getProvider());
70 
71  if ($form->checkInput()) {
72  $form->initProvider($this->object->getProvider());
73  $this->object->getProvider()->save();
74 
75  $DIC->ctrl()->redirect($this, self::CMD_SHOW_SETTINGS);
76  }
77 
78  $this->showSettingsCmd($form);
79  }
showSettingsCmd(ilLTIConsumeProviderFormGUI $form=null)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ showSettingsCmd()

ilLTIConsumeProviderSettingsGUI::showSettingsCmd ( ilLTIConsumeProviderFormGUI  $form = null)
protected

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

References $DIC, and buildForm().

Referenced by saveSettingsCmd().

55  {
56  global $DIC; /* @var \ILIAS\DI\Container $DIC */
57 
58  if ($form === null) {
59  $form = $this->buildForm($this->object->getProvider());
60  }
61 
62  $DIC->ui()->mainTemplate()->setContent($form->getHTML());
63  }
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilLTIConsumeProviderSettingsGUI::$access
protected

Definition at line 27 of file class.ilLTIConsumeProviderSettingsGUI.php.

Referenced by __construct().

◆ $object

ilLTIConsumeProviderSettingsGUI::$object
protected

Definition at line 22 of file class.ilLTIConsumeProviderSettingsGUI.php.

Referenced by __construct().

◆ CMD_SAVE_SETTINGS

const ilLTIConsumeProviderSettingsGUI::CMD_SAVE_SETTINGS = 'saveSettings'

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

◆ CMD_SHOW_SETTINGS

const ilLTIConsumeProviderSettingsGUI::CMD_SHOW_SETTINGS = 'showSettings'

Definition at line 16 of file class.ilLTIConsumeProviderSettingsGUI.php.


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