ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSMappingSettingsGUI Class Reference
+ Collaboration diagram for ilECSMappingSettingsGUI:

Public Member Functions

 __construct ($settingsContainer, $server_id)
 Constructor.
 getContainer ()
 Get container object.
 getServer ()
 executeCommand ()
 ilCtrl executeCommand
 cancel ()
 return to parent container

Data Fields

const TAB_DIRECTORY = 1
const TAB_COURSE = 2

Protected Member Functions

 cStart ()
 Goto default page.
 dStart ()
 Goto default page.
 cSettings ()
 Show course allocation ilTabsGUI $ilTabs.
 initFormCSettings ()
 Init settings form.
 dSettings ()
 Show directory allocation ilTabsGUI $ilTabs.
 dUpdateSettings ()
 Update node mapping settings.
 initFormDSettings ()
 dTrees ()
 Show directory trees.
 dMappingOverview ()
 Show directory trees.
 setTabs ()
 Set tabs ilTabsGUI $ilTabs.
 setSubTabs ($a_tab)
 Set Sub tabs ilTabsGUI $ilTabs.

Protected Attributes

 $lng = null
 $ctrl = null

Private Attributes

 $container = null
 $server = null

Detailed Description

Definition at line 15 of file class.ilECSMappingSettingsGUI.php.

Constructor & Destructor Documentation

ilECSMappingSettingsGUI::__construct (   $settingsContainer,
  $server_id 
)

Constructor.

Parameters
ilObjectGUI$settingsContainer

Definition at line 30 of file class.ilECSMappingSettingsGUI.php.

References $ilCtrl, $lng, and ilECSSetting\getInstanceByServerId().

{
global $lng,$ilCtrl;
$this->container = $settingsContainer;
$this->server = ilECSSetting::getInstanceByServerId($server_id);
$this->lng = $lng;
$this->ctrl = $ilCtrl;
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSMappingSettingsGUI::cancel ( )

return to parent container

Definition at line 93 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS.

{
$GLOBALS['ilCtrl']->returnToParent($this);
}
ilECSMappingSettingsGUI::cSettings ( )
protected

Show course allocation ilTabsGUI $ilTabs.

Returns
bool

Definition at line 130 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, and initFormCSettings().

Referenced by cStart().

{
global $ilTabs;
$ilTabs->activateTab('ecs_crs_allocation');
$form = $this->initFormCSettings();
$GLOBALS['tpl']->setContent($form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::cStart ( )
protected

Goto default page.

Returns
<type>

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

References cSettings(), and ilECSNodeMappingSettings\getInstance().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
{
return $this->cSettings();
}
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dMappingOverview ( )
protected

Show directory trees.

Definition at line 265 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, and setSubTabs().

{
$this->setSubTabs(self::TAB_DIRECTORY);
$GLOBALS['ilTabs']->activateSubTab('dMappingOverview');
$GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dSettings ( )
protected

Show directory allocation ilTabsGUI $ilTabs.

Definition at line 187 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, initFormDSettings(), and setSubTabs().

Referenced by dStart().

{
global $ilTabs;
$this->setSubTabs(self::TAB_DIRECTORY);
$ilTabs->activateTab('ecs_dir_allocation');
$ilTabs->activateSubTab('dSettings');
$form = $this->initFormDSettings();
$GLOBALS['tpl']->setContent($form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::dStart ( )
protected

Goto default page.

Returns
<type>

Definition at line 115 of file class.ilECSMappingSettingsGUI.php.

References dSettings(), and ilECSNodeMappingSettings\getInstance().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
{
return $this->dSettings();
}
return $this->dSettings();
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dTrees ( )
protected

Show directory trees.

Definition at line 255 of file class.ilECSMappingSettingsGUI.php.

References $GLOBALS, and setSubTabs().

{
$this->setSubTabs(self::TAB_DIRECTORY);
$GLOBALS['ilTabs']->activateSubTab('dTrees');
$GLOBALS['ilTabs']->activateTab('ecs_dir_allocation');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::dUpdateSettings ( )
protected

Update node mapping settings.

Definition at line 204 of file class.ilECSMappingSettingsGUI.php.

References $ilCtrl, ilECSNodeMappingSettings\getInstance(), initFormDSettings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl;
$form = $this->initFormDSettings();
if($form->checkInput())
{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
ilECSNodeMappingSettings::getInstance()->enable((bool) $form->getInput('active'));
ilECSNodeMappingSettings::getInstance()->enableEmptyContainerCreation(!$form->getInput('empty'));
ilUtil::sendSuccess($this->lng->txt('saved_settings'),true);
}
else
{
ilUtil::sendFailure($this->lng->txt('err_check_input'),true);
$form->setValuesByPost();
}
$ilCtrl->redirect($this,'dSettings');
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::executeCommand ( )

ilCtrl executeCommand

Definition at line 61 of file class.ilECSMappingSettingsGUI.php.

References $cmd, $GLOBALS, $ilCtrl, getServer(), and setTabs().

{
global $ilCtrl;
$GLOBALS['tpl']->setTitle($this->lng->txt('ecs_campus_connect_title'));
$this->ctrl->saveParameter($this,'server_id');
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->setTabs();
switch($next_class)
{
default:
if(!$cmd)
{
$cmd = "cStart";
}
$this->$cmd();
break;
}
$GLOBALS['tpl']->setTitle($this->getServer()->getTitle());
$GLOBALS['tpl']->setDescription('');
return true;
}

+ Here is the call graph for this function:

ilECSMappingSettingsGUI::getContainer ( )

Get container object.

Returns
ilObjectGUI

Definition at line 44 of file class.ilECSMappingSettingsGUI.php.

References $container.

{
}
ilECSMappingSettingsGUI::getServer ( )
Returns
ilECSSetting

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

References $server.

Referenced by executeCommand().

{
return $this->server;
}

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::initFormCSettings ( )
protected

Init settings form.

Definition at line 146 of file class.ilECSMappingSettingsGUI.php.

References $tpl, ilFormPropertyGUI\setInfo(), and ilFormPropertyGUI\setRequired().

Referenced by cSettings().

{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('settings'));
// add default container
$imp = new ilCustomInputGUI($this->lng->txt('ecs_import_id'),'import_id');
$imp->setRequired(true);
$tpl = new ilTemplate('tpl.ecs_import_id_form.html',true,true,'Services/WebServices/ECS');
$tpl->setVariable('SIZE',5);
$tpl->setVariable('MAXLENGTH',11);
$tpl->setVariable('POST_VAR','import_id');
# $tpl->setVariable('PROPERTY_VALUE',$this->rule->getContainerId());
#if($this->settings->getImportId())
{
# $tpl->setVariable('COMPLETE_PATH',$this->buildPath($this->rule->getContainerId()));
}
$imp->setHTML($tpl->get());
$imp->setInfo($this->lng->txt('ecs_import_id_info'));
$form->addItem($imp);
// individual course allocation
$check = new ilCheckboxInputGUI($this->lng->txt('ecs_individual_alloc'), 'individual');
$check->setInfo($this->lng->txt('ecs_individual_alloc'));
$form->addItem($check);
$form->addCommandButton('cUpdateSettings',$this->lng->txt('save'));
$form->addCommandButton('cSettings', $this->lng->txt('cancel'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::initFormDSettings ( )
protected

Definition at line 228 of file class.ilECSMappingSettingsGUI.php.

References ilECSNodeMappingSettings\getInstance(), and ilCheckboxInputGUI\setChecked().

Referenced by dSettings(), and dUpdateSettings().

{
include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt('general_settings'));
$active = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_activate'), 'active');
$form->addItem($active);
$create_empty = new ilCheckboxInputGUI($this->lng->txt('ecs_node_mapping_create_empty'), 'empty');
$create_empty->setChecked(!ilECSNodeMappingSettings::getInstance()->isEmptyContainerCreationEnabled());
$create_empty->setInfo($this->lng->txt('ecs_node_mapping_create_empty_info'));
$form->addItem($create_empty);
$form->addCommandButton('dUpdateSettings',$this->lng->txt('save'));
$form->addCommandButton('cancel', $this->lng->txt('cancel'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::setSubTabs (   $a_tab)
protected

Set Sub tabs ilTabsGUI $ilTabs.

Parameters
string$a_tab

Definition at line 302 of file class.ilECSMappingSettingsGUI.php.

Referenced by dMappingOverview(), dSettings(), and dTrees().

{
global $ilTabs;
if($a_tab == self::TAB_DIRECTORY)
{
$ilTabs->addSubTab(
'dMappingOverview',
$this->lng->txt('ecs_cc_mapping_overview'),
$this->ctrl->getLinkTarget($this,'dMappingOverview')
);
$ilTabs->addSubTab(
'dTrees',
$this->lng->txt('ecs_cms_dir_tree'),
$this->ctrl->getLinkTarget($this,'dTrees')
);
$ilTabs->addSubTab(
'dSettings',
$this->lng->txt('settings'),
$this->ctrl->getLinkTarget($this,'dSettings')
);
}
}

+ Here is the caller graph for this function:

ilECSMappingSettingsGUI::setTabs ( )
protected

Set tabs ilTabsGUI $ilTabs.

Definition at line 276 of file class.ilECSMappingSettingsGUI.php.

Referenced by executeCommand().

{
global $ilTabs;
$ilTabs->clearTargets();
$ilTabs->setBackTarget(
$this->lng->txt('ecs_back_settings'),
$this->ctrl->getParentReturn($this)
);
$ilTabs->addTab(
'ecs_dir_allocation',
$this->lng->txt('ecs_dir_alloc'),
$this->ctrl->getLinkTarget($this,'dSettings')
);
$ilTabs->addTab(
'ecs_crs_allocation',
$this->lng->txt('ecs_crs_alloc'),
$this->ctrl->getLinkTarget($this,'cSettings')
);
}

+ Here is the caller graph for this function:

Field Documentation

ilECSMappingSettingsGUI::$container = null
private

Definition at line 20 of file class.ilECSMappingSettingsGUI.php.

Referenced by getContainer().

ilECSMappingSettingsGUI::$ctrl = null
protected

Definition at line 24 of file class.ilECSMappingSettingsGUI.php.

ilECSMappingSettingsGUI::$lng = null
protected

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

Referenced by __construct().

ilECSMappingSettingsGUI::$server = null
private

Definition at line 21 of file class.ilECSMappingSettingsGUI.php.

Referenced by getServer().

const ilECSMappingSettingsGUI::TAB_COURSE = 2

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

const ilECSMappingSettingsGUI::TAB_DIRECTORY = 1

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


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