ILIAS  Release_4_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, $a_session_key)
 buildSubTabs ()
 setSection ($a_section)
 getSection ()
 setSubSection ($a_sub_section)
 getSubSection ()
 showButton ($a_cmd, $a_text, $a_target= '')
 initTableGUI ()
 setTableGUIBasicData ($tbl, $result_set, $a_default_order_column= '')

Additional Inherited Members

- Protected Attributes inherited from ilShopBaseGUI
 $ctrl = null
 $ilias = null
 $lng = null
 $tpl = null
 $oGeneralSettings = null
 $section = 0
 $sub_section = 0

Detailed Description

Class ilShopPersonalSettingsGUI.

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

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

Constructor & Destructor Documentation

ilShopPersonalSettingsGUI::__construct ( )

Reimplemented from ilShopBaseGUI.

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

Member Function Documentation

ilShopPersonalSettingsGUI::executeCommand ( )

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

References $cmd, prepareOutput(), and ilUtil\redirect().

{
global $ilUser;
// check access
if(!(bool)$this->oGeneralSettings->get('topics_allow_custom_sorting'))
{
ilUtil::redirect($this->ctrl->getLinkTargetByClass('ilshopgui'));
}
if(ANONYMOUS_USER_ID == $ilUser->getId())
{
$this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->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 73 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 82 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 99 of file class.ilShopPersonalSettingsGUI.php.

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

Referenced by saveSorting().

{
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.shop_personal_settings_topics_list.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('TOPICS_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: