ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilShopPersonalSettingsGUI Class Reference

Class ilShopPersonalSettingsGUI. More...

+ Inheritance diagram for ilShopPersonalSettingsGUI:
+ Collaboration diagram for ilShopPersonalSettingsGUI:

Public Member Functions

 __construct ()
 executeCommand ()
 saveSorting ()
 showTopicsSortingTable ()

Protected Member Functions

 prepareOutput ()
- Protected Member Functions inherited from ilShopBaseGUI
 addPager ($result)

Additional Inherited Members

- Protected Attributes inherited from ilShopBaseGUI
 $ctrl = null
 $lng = null
 $tpl = null
 $settings = null

Detailed Description

Class ilShopPersonalSettingsGUI.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 14 of file class.ilShopPersonalSettingsGUI.php.

Constructor & Destructor Documentation

ilShopPersonalSettingsGUI::__construct ( )

Reimplemented from ilShopBaseGUI.

Definition at line 16 of file class.ilShopPersonalSettingsGUI.php.

Member Function Documentation

ilShopPersonalSettingsGUI::executeCommand ( )

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

References $cmd, $ilCtrl, $ilErr, $ilUser, and prepareOutput().

{
// check access
if(!(bool)$this->settings->get('topics_allow_custom_sorting'))
{
$ilCtrl->redirectByClass('ilshopgui','','',false, false);
}
if(ANONYMOUS_USER_ID == $ilUser->getId())
{
$ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
default:
if (!$cmd)
{
$cmd = 'showTopicsSortingTable';
}
$this->prepareOutput();
$this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilShopPersonalSettingsGUI::prepareOutput ( )
protected

Reimplemented from ilShopBaseGUI.

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

Referenced by executeCommand().

{
global $ilTabs;
$ilTabs->setTabActive('pay_personal_settings');
}

+ Here is the caller graph for this function:

ilShopPersonalSettingsGUI::saveSorting ( )

Definition at line 62 of file class.ilShopPersonalSettingsGUI.php.

References $_POST, ilUtil\sendInfo(), and showTopicsSortingTable().

{
if(count($_POST['sorting']))
{
foreach($_POST['sorting'] as $topic_id => $sorting_value)
{
$oTopic = new ilShopTopic($topic_id);
$oTopic->setCustomSorting((int)$sorting_value);
$oTopic->saveCustomSorting();
}
}
ilUtil::sendInfo($this->lng->txt('saved_successfully'));
return $this->showTopicsSortingTable();
}

+ Here is the call graph for this function:

ilShopPersonalSettingsGUI::showTopicsSortingTable ( )

Definition at line 79 of file class.ilShopPersonalSettingsGUI.php.

References ilShopTopics\_getInstance(), and ilShopTopics\TOPICS_SORT_MANUALLY.

Referenced by saveSorting().

{
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
include_once 'Services/Payment/classes/class.ilShopPersonalSettingsTopicsTableGUI.php';
$table_gui = new ilShopPersonalSettingsTopicsTableGUI($this, 'showTopicsSortingTable');
$table_gui->setTitle($this->lng->txt('pay_manual_sorting_of_topics'));
ilShopTopics::_getInstance()->enableCustomSorting(true);
ilShopTopics::_getInstance()->setSortingDirection('ASC');
$table_gui->parseRecords(ilShopTopics::_getInstance()->getTopics());
$table_gui->addCommandButton('saveSorting', $this->lng->txt('pay_save_sorting'));
$this->tpl->setVariable('TABLE', $table_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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