Class ilShopTopicsGUI.
More...
◆ __construct()
ilShopTopicsGUI::__construct |
( |
|
$a_gui_object | ) |
|
◆ confirmDeleteTopic()
ilShopTopicsGUI::confirmDeleteTopic |
( |
| ) |
|
◆ executeCommand()
ilShopTopicsGUI::executeCommand |
( |
| ) |
|
◆ performDeleteTopic()
ilShopTopicsGUI::performDeleteTopic |
( |
| ) |
|
◆ saveSorting()
ilShopTopicsGUI::saveSorting |
( |
| ) |
|
◆ saveTopic()
ilShopTopicsGUI::saveTopic |
( |
| ) |
|
◆ saveTopicsSettings()
ilShopTopicsGUI::saveTopicsSettings |
( |
| ) |
|
Definition at line 119 of file class.ilShopTopicsGUI.php.
References $_POST, ilPaymentSettings\_getInstance(), ilUtil\sendSuccess(), and showTopicsSettings().
122 $genSet->set(
'enable_topics',
$_POST[
'enable_topics'],
'gui');
123 $genSet->set(
'topics_allow_custom_sorting',
$_POST[
'topics_allow_custom_sorting'],
'gui');
124 $genSet->set(
'topics_sorting_type',
$_POST[
'topics_sorting_type'],
'gui');
125 $genSet->set(
'topics_sorting_direction',
$_POST[
'topics_sorting_direction'],
'gui');
126 $genSet->set(
'show_topics_filter',
$_POST[
'show_topics_filter'],
'gui');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
◆ showTopicForm()
ilShopTopicsGUI::showTopicForm |
( |
| ) |
|
Definition at line 159 of file class.ilShopTopicsGUI.php.
References ilTextInputGUI\setValue().
Referenced by saveTopic().
161 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.main_view.html',
'Services/Payment');
163 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
167 if($this->objCurrentTopic->getId())
169 $this->ctrl->setParameter($this,
'topic_id', $this->objCurrentTopic->getId());
171 $form->setFormAction($this->ctrl->getFormAction($this,
'saveTopic'));
173 $form->setTitle($this->lng->txt($this->objCurrentTopic->getId() ?
'edit_topic' :
'new_topic'));
176 $title->
setValue($this->objCurrentTopic->getTitle());
177 $title->setRequired(
true);
178 $form->addItem($title);
180 $sorting =
new ilTextInputGUI($this->lng->txt(
'pay_sorting_value'),
'sorting');
181 $sorting->
setValue($this->objCurrentTopic->getSorting());
182 $sorting->setMaxLength(11);
183 $sorting->setSize(11);
184 $form->addItem($sorting);
186 $form->addCommandButton(
'saveTopic', $this->lng->txt(
'save'));
187 $form->addCommandButton(
'showTopicsList', $this->lng->txt(
'cancel'));
189 $this->tpl->setVariable(
'FORM', $form->getHTML());
This class represents a text property in a property form.
setValue($a_value)
Set Value.
◆ showTopicsList()
ilShopTopicsGUI::showTopicsList |
( |
| ) |
|
Definition at line 253 of file class.ilShopTopicsGUI.php.
References $_POST, ilShopTopics\_getInstance(), ilShopTopic\_lookupTitle(), and ilShopTopics\TOPICS_SORT_MANUALLY.
Referenced by confirmDeleteTopic(), performDeleteTopic(), saveSorting(), and saveTopic().
255 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.main_view.html',
'Services/Payment');
257 if($this->ask_for_deletion)
259 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
262 $c_gui->setFormAction($this->ctrl->getFormAction($this,
'performDeleteTopic'));
263 $c_gui->setHeaderText($this->lng->txt(
'sure_delete_topics'));
264 $c_gui->setCancel($this->lng->txt(
'cancel'),
'showTopicsList');
265 $c_gui->setConfirm($this->lng->txt(
'confirm'),
'performDeleteTopic');
267 foreach(
$_POST[
'topic_id'] as $topic_id)
272 $this->tpl->setVariable(
'CONFIRMATION', $c_gui->getHTML());
277 include_once
'Services/Payment/classes/class.ilShopTopicsTableGUI.php';
279 $table_gui->setTitle($this->lng->txt(
'topics'));
284 $table_gui->addCommandButton(
'showTopicForm', $this->lng->txt(
'add'));
285 $table_gui->addCommandButton(
'saveSorting', $this->lng->txt(
'pay_save_sorting'));
287 $this->tpl->setVariable(
'TABLE', $table_gui->getHTML());
const TOPICS_SORT_MANUALLY
static _lookupTitle($a_id)
Class ilShopTopicsTableGUI.
Confirmation screen class.
◆ showTopicsSettings()
ilShopTopicsGUI::showTopicsSettings |
( |
| ) |
|
Definition at line 60 of file class.ilShopTopicsGUI.php.
References $options, ilPaymentSettings\_getInstance(), ilCheckboxInputGUI\setChecked(), and ilSelectInputGUI\setValue().
Referenced by saveTopicsSettings().
62 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.main_view.html',
'Services/Payment');
65 $genSetData = $genSet->getAll();
68 $form->setFormAction($this->ctrl->getFormAction($this,
'saveTopicsSettings'));
69 $form->setTitle($this->lng->txt(
'pays_general_settings'));
71 $form->addCommandButton(
'saveTopicsSettings',$this->lng->txt(
'save'));
75 $formItem->
setChecked((
int)$genSetData[
'enable_topics']);
76 $formItem->setInfo($this->lng->txt(
'enable_topics_info'));
77 $form->addItem($formItem);
81 $formItem =
new ilSelectInputGUI($this->lng->txt(
'pay_topics_default_sorting_type'),
'topics_sorting_type');
82 $formItem->
setValue($genSetData[
'topics_sorting_type']);
84 1 => $this->lng->txt(
'pay_topics_sort_by_title'),
85 2 => $this->lng->txt(
'pay_topics_sort_by_date'),
86 3 => $this->lng->txt(
'pay_topics_sort_manually')
89 $form->addItem($formItem);
92 $formItem =
new ilSelectInputGUI($this->lng->txt(
'pay_topics_default_sorting_direction'),
'topics_sorting_direction');
93 $formItem->
setValue($genSetData[
'topics_sorting_direction']);
95 'asc' => $this->lng->txt(
'sort_asc'),
96 'desc' => $this->lng->txt(
'sort_desc'),
99 $form->addItem($formItem);
102 $formItem =
new ilCheckboxInputGUI($this->lng->txt(
'pay_topics_allow_custom_sorting'),
'topics_allow_custom_sorting');
103 $formItem->
setChecked((
int)$genSetData[
'topics_allow_custom_sorting']);
104 $formItem->setInfo($this->lng->txt(
'pay_topics_allow_custom_sorting_info'));
105 $form->addItem($formItem);
108 $formItem =
new ilCheckboxInputGUI($this->lng->txt(
'show_topics_filter'),
'show_topics_filter');
109 $formItem->
setChecked((
int)$genSetData[
'show_topics_filter']);
110 $formItem->setInfo($this->lng->txt(
'show_topics_filter_info'));
111 $form->addItem($formItem);
113 $this->tpl->setVariable(
'FORM',$form->getHTML());
if(!is_array($argv)) $options
◆ $ask_for_deletion
ilShopTopicsGUI::$ask_for_deletion = false |
|
private |
◆ $ctrl
ilShopTopicsGUI::$ctrl = null |
|
private |
◆ $lng
ilShopTopicsGUI::$lng = null |
|
private |
◆ $objCurrentTopic
ilShopTopicsGUI::$objCurrentTopic = null |
|
private |
◆ $tpl
ilShopTopicsGUI::$tpl = null |
|
private |
The documentation for this class was generated from the following file: