News settings for containers.
More...
News settings for containers.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 12 of file class.ilContainerNewsSettingsGUI.php.
◆ __construct()
ilContainerNewsSettingsGUI::__construct |
( |
ilObjectGUI |
$a_parent_gui | ) |
|
Constructor.
Definition at line 47 of file class.ilContainerNewsSettingsGUI.php.
References $DIC.
51 $this->ctrl = $DIC->ctrl();
52 $this->lng = $DIC->language();
53 $this->tpl = $DIC[
"tpl"];
54 $this->setting = $DIC[
"ilSetting"];
55 $this->parent_gui = $a_parent_gui;
56 $this->
object = $this->parent_gui->object;
◆ executeCommand()
ilContainerNewsSettingsGUI::executeCommand |
( |
| ) |
|
Execute command.
Definition at line 62 of file class.ilContainerNewsSettingsGUI.php.
References array.
64 $next_class = $this->ctrl->getNextClass($this);
65 $cmd = $this->ctrl->getCmd(
"show");
67 switch ($next_class) {
69 if (in_array($cmd,
array(
"show",
"save"))) {
Create styles array
The data for the language used.
◆ initForm()
ilContainerNewsSettingsGUI::initForm |
( |
| ) |
|
Init settings form.
Definition at line 90 of file class.ilContainerNewsSettingsGUI.php.
References $form, ilObject\_getAllReferences(), ilObject\_lookupType(), ilMembershipNotifications\addToSettingsForm(), array, ilObjectServiceSettingsGUI\NEWS_VISIBILITY, object, ilFormPropertyGUI\setInfo(), and ilCheckboxInputGUI\setValue().
Referenced by save(), and show().
92 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
93 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
96 if ($this->setting->get(
'block_activated_news')) {
100 $news->setChecked($this->
object->getNewsBlockActivated());
101 $news->setInfo($this->lng->txt(
'obj_tool_setting_news_info'));
102 $form->addItem($news);
106 include_once
'Services/Membership/classes/class.ilMembershipNotifications.php';
113 $cb->
setInfo($this->lng->txt(
"cont_news_timeline_info"));
114 $cb->setChecked($this->
object->getNewsTimeline());
118 $cb2 =
new ilCheckboxInputGUI($this->lng->txt(
"cont_news_timeline_auto_entries"),
"news_timeline_auto_entries");
119 $cb2->
setInfo($this->lng->txt(
"cont_news_timeline_auto_entries_info"));
120 $cb2->setChecked($this->
object->getNewsTimelineAutoEntries());
121 $cb->addSubItem($cb2);
124 $cb2 =
new ilCheckboxInputGUI($this->lng->txt(
"cont_news_timeline_landing_page"),
"news_timeline_landing_page");
125 $cb2->
setInfo($this->lng->txt(
"cont_news_timeline_landing_page_info"));
126 $cb2->setChecked($this->
object->getNewsTimelineLandingPage());
127 $cb->addSubItem($cb2);
130 $form->addCommandButton(
"save", $this->lng->txt(
"save"));
132 $form->setTitle($this->lng->txt(
"cont_news_settings"));
133 $form->setFormAction($this->ctrl->getFormAction($this));
static _getAllReferences($a_id)
get all reference ids of object
static addToSettingsForm($a_ref_id, ilPropertyFormGUI $a_form=null, ilFormPropertyGUI $a_input=null)
Add notification settings to form.
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
Create new PHPExcel object
obj_idprivate
◆ save()
ilContainerNewsSettingsGUI::save |
( |
| ) |
|
Save settings form.
Definition at line 141 of file class.ilContainerNewsSettingsGUI.php.
References $form, ilObject\_getAllReferences(), ilObject\_lookupType(), array, ilMembershipNotifications\importFromForm(), initForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, object, and ilUtil\sendSuccess().
144 if (
$form->checkInput()) {
145 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
147 $this->
object->setNewsTimeline(
$form->getInput(
"news_timeline"));
148 $this->
object->setNewsTimelineAutoEntries(
$form->getInput(
"news_timeline_auto_entries"));
149 $this->
object->setNewsTimelineLandingPage(
$form->getInput(
"news_timeline_landing_page"));
152 if ($this->setting->get(
'block_activated_news')) {
156 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
161 $this->
object->update();
163 $this->ctrl->redirect($this,
"");
165 $form->setValuesByPost();
166 $this->tpl->setContent(
$form->getHtml());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getAllReferences($a_id)
get all reference ids of object
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
initForm()
Init settings form.
Create new PHPExcel object
obj_idprivate
static importFromForm($a_ref_id, ilPropertyFormGUI $a_form=null)
Import notification settings from form.
◆ show()
ilContainerNewsSettingsGUI::show |
( |
| ) |
|
◆ $ctrl
ilContainerNewsSettingsGUI::$ctrl |
|
protected |
◆ $lng
ilContainerNewsSettingsGUI::$lng |
|
protected |
◆ $object
ilContainerNewsSettingsGUI::$object |
|
protected |
◆ $parent_gui
ilContainerNewsSettingsGUI::$parent_gui |
|
protected |
◆ $setting
ilContainerNewsSettingsGUI::$setting |
|
protected |
◆ $tpl
ilContainerNewsSettingsGUI::$tpl |
|
protected |
The documentation for this class was generated from the following file: