3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
23 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
27 $this->lng = $DIC->language();
29 $this->ctrl = $DIC->ctrl();
30 $this->access = $DIC->access();
32 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
34 $this->lng->loadLanguageModule(
"prtf");
45 $next_class = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
50 switch ($next_class) {
51 case 'ilpermissiongui':
52 $this->tabs_gui->setTabActive(
'perm_settings');
53 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
55 $this->ctrl->forwardCommand($perm_gui);
59 if (!$cmd || $cmd ==
'view') {
60 $cmd =
"editSettings";
78 $this->tabs_gui->addTarget(
80 $this->ctrl->getLinkTarget($this,
"editSettings"),
81 array(
"editSettings",
"view")
86 $this->tabs_gui->addTarget(
88 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
104 $this->tabs_gui->setTabActive(
'settings');
120 $this->tpl->setContent($a_form->getHTML());
135 if (
$form->checkInput()) {
138 $banner = (bool)
$form->getInput(
"banner");
141 $prfa_set->set(
"pd_block", (
bool)
$form->getInput(
"pd_block"));
142 $prfa_set->set(
"banner", $banner);
143 $prfa_set->set(
"banner_width", (
int)
$form->getInput(
"width"));
144 $prfa_set->set(
"banner_height", (
int)
$form->getInput(
"height"));
145 $prfa_set->set(
"mask", (
bool)
$form->getInput(
"mask"));
146 $prfa_set->set(
"mycrs", (
bool)
$form->getInput(
"mycrs"));
149 $ilCtrl->redirect($this,
"editSettings");
152 $form->setValuesByPost();
163 $ilCtrl->redirect($this,
"view");
177 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
179 $form->setFormAction($this->ctrl->getFormAction($this));
180 $form->setTitle($this->lng->txt(
'prtf_settings'));
182 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
183 $form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
184 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
188 $lng->loadLanguageModule(
'pd');
189 $lng->loadLanguageModule(
'user');
192 $prtf_prop->setInfo(
$lng->txt(
'user_portfolios_desc'));
193 $prtf_prop->setChecked((
$ilSetting->get(
'user_portfolios') ?
'1' :
'0'));
194 $form->addItem($prtf_prop);
199 $pdblock->
setInfo(
$lng->txt(
"prtf_pd_block_info"));
200 $pdblock->setChecked($prfa_set->get(
"pd_block",
false));
201 $form->addItem($pdblock);
204 $banner->
setInfo(
$lng->txt(
"prtf_preview_banner_info"));
205 $form->addItem($banner);
210 $banner->addSubItem($width);
215 $banner->addSubItem($height);
217 $banner->setChecked($prfa_set->get(
"banner",
false));
218 if ($prfa_set->get(
"banner")) {
219 $width->setValue($prfa_set->get(
"banner_width"));
220 $height->setValue($prfa_set->get(
"banner_height"));
222 $width->setValue(1370);
223 $height->setValue(100);
234 $this->ctrl->setParameter($gui,
"ref_id", $gui->object->getRefId());
235 $link = $this->ctrl->getLinkTarget($gui);
236 $ne->
setValue(
"<a href='$link'> >> ".$this->lng->txt(
"settings").
"</a>");
240 $mycourses->
setInfo(
$lng->txt(
"prtf_allow_my_courses_info"));
241 $mycourses->setChecked($prfa_set->get(
"mycrs",
true));
242 $form->addItem($mycourses);
251 switch ($a_form_id) {
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editSettings($a_form=null)
Edit settings.
setValue($a_value)
Set Value.
initFormSettings()
Init settings property form.
Portfolio Administration Settings.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
prepareOutput($a_show_subobjects=true)
prepare output
executeCommand()
Execute command.
if(isset($_POST['submit'])) $form
Class ilObjectGUI Basic methods of all Output classes.
Create styles array
The data for the language used.
This class represents a non editable value in a property form.
addToExternalSettingsForm($a_form_id)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
saveSettings()
Save settings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.