38        $this->ctrl = 
$DIC->ctrl();
 
   39        $this->lng = 
$DIC->language();
 
   40        $this->lng->loadLanguageModule(
'orgu');
 
   41        $this->tpl = 
$DIC->ui()->mainTemplate();
 
   49        $cmd = $this->ctrl->getCmd(
'settings');
 
   50        $next_class = $this->ctrl->getNextClass($this);
 
   52        switch ($next_class) {
 
   68        $this->tpl->setContent(
$form->getHTML());
 
   79        $form->setFormAction($this->ctrl->getFormAction($this, 
'saveSettings'));
 
   83        $section->setTitle($this->lng->txt(
'orgu_enable_my_staff'));
 
   86        $item = 
new ilCheckboxInputGUI($this->lng->txt(
"orgu_enable_my_staff"), 
"enable_my_staff");
 
   87        $item->setInfo($this->lng->txt(
"orgu_enable_my_staff_info"));
 
   89        $item->setChecked((
$DIC->settings()->get(
"enable_my_staff") ? 
true : 
false));
 
   90        $form->addItem($item);
 
   94        $section->setTitle($this->lng->txt(
'orgu_global_set_positions'));
 
   97        $available_types = 
$GLOBALS[
'DIC'][
'objDefinition']->getOrgUnitPermissionTypes();
 
   98        foreach ($available_types as $object_type) {
 
  102                $this->lng->txt(
'orgu_global_set_positions_type_active') . 
' ' . $this->lng->txt(
'objs_' . $object_type),
 
  103                $object_type . 
'_active' 
  106            $type->setChecked($setting->isActive());
 
  108            $scope = 
new ilRadioGroupInputGUI($this->lng->txt(
'orgu_global_set_type_changeable'), $object_type . 
'_changeable');
 
  109            $scope->setValue((
int) $setting->isChangeableForObject());
 
  112                $this->lng->txt(
'orgu_global_set_type_changeable_object'),
 
  115            $default = 
new ilCheckboxInputGUI($this->lng->txt(
'orgu_global_set_type_default'), $object_type . 
'_default');
 
  116            $default->setInfo($this->lng->txt(
'orgu_global_set_type_default_info'));
 
  118            $default->setChecked($setting->getActivationDefault());
 
  120            $scope_object->addSubItem($default);
 
  121            $scope->addOption($scope_object);
 
  124                $this->lng->txt(
'orgu_global_set_type_changeable_no'),
 
  127            $scope->addOption($scope_global);
 
  129            $type->addSubItem($scope);
 
  132        $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
 
  138    protected function saveSettings()
 
  144        $objDefinition = 
$DIC[
'objDefinition'];
 
  146        if (
$form->checkInput()) {
 
  148            $available_types = $objDefinition->getOrgUnitPermissionTypes();
 
  149            foreach ($available_types as $object_type) {
 
  151                $obj_setting->setActive((
bool) 
$form->getInput($object_type . 
'_active'));
 
  152                $obj_setting->setActivationDefault((
int) 
$form->getInput($object_type . 
'_default'));
 
  153                $obj_setting->setChangeableForObject((
bool) 
$form->getInput($object_type
 
  155                $obj_setting->update();
 
  160            $DIC->settings()->set(
"enable_my_staff", (
int) (
$_POST[
"enable_my_staff"] ? 1 : 0));
 
  163            $this->ctrl->redirect($this, 
'settings');
 
  165            $form->setValuesByPost();
 
An exception for terminatinating execution or to throw for unit testing.
Global orgunit settings GUI.
settings(ilPropertyFormGUI $form=null)
Show settings.
initSettingsForm()
Init settings form.
executeCommand()
Ctrl execute command.
__construct()
Default constructor @global type $DIC.
Object settings regarding position permissions.
This class represents an option in a radio group.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(isset($_POST['submit'])) $form