Public Member Functions | Data Fields

ilPaymentBaseGUI Class Reference

Inheritance diagram for ilPaymentBaseGUI:

Public Member Functions

 ilPaymentBaseGUI ()
 setSection ($a_section)
 getSection ()
 setMainSection ($a_main_section)
 getMainSection ()
 buildHeader ()
 showButton ($a_cmd, $a_text, $a_target= '')
initTableGUI ()
 setTableGUIBasicData (&$tbl, &$result_set, $a_default_order_column= '')
 __buildStatusline ()
 __buildLocator ()
 __buildStylesheet ()
 __buildButtons ()

Data Fields

 $ilias
 $lng
 $db
 $tpl
 $rbacsystem
 $tabs_gui
 $user_obj
 $section
 $main_section

Detailed Description

Definition at line 25 of file class.ilPaymentBaseGUI.php.


Member Function Documentation

ilPaymentBaseGUI::__buildButtons (  ) 

Definition at line 189 of file class.ilPaymentBaseGUI.php.

References ilPaymentTrustees::_hasObjectPermission(), ilPaymentTrustees::_hasStatisticPermission(), ilPaymentVendors::_isVendor(), getMainSection(), and getSection().

Referenced by buildHeader().

        {
                $this->tpl->addBlockFile("TABS", "tabs", "tpl.tabs.html");

                if($this->getMainSection() == $this->ADMIN)
                {
                        if(ilPaymentVendors::_isVendor($this->user_obj->getId()) or 
                           ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId()))
                        {
                                $this->tabs_gui->addSubTabTarget('paya_statistic',
                                                                                                 $this->ctrl->getLinkTargetByClass('ilpaymentstatisticgui'),
                                                                                                 '',
                                                                                                 '',
                                                                                                 '',
                                                                                                 $this->getSection() == $this->SECTION_STATISTIC ? true : false);
/*                              $this->tpl->setCurrentBlock("tab");
                                $this->tpl->setVariable('TAB_TYPE',$this->getSection() == $this->SECTION_STATISTIC ? 'tabactive' : 'tabinactive');
                                $this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilpaymentstatisticgui'));
                                $this->tpl->setVariable("TAB_TEXT",$this->lng->txt('paya_statistic'));
                                $this->tpl->parseCurrentBlock();*/
                        }
                        if(ilPaymentVendors::_isVendor($this->user_obj->getId()) or 
                           ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId()))
                        {
                                $this->tabs_gui->addSubTabTarget('paya_object',
                                                                                                 $this->ctrl->getLinkTargetByClass('ilpaymentobjectgui'),
                                                                                                 '',
                                                                                                 '',
                                                                                                 '',
                                                                                                 $this->getSection() == $this->SECTION_OBJECT ? true : false);
/*                              $this->tpl->setCurrentBlock("tab");
                                $this->tpl->setVariable('TAB_TYPE',$this->getSection() == $this->SECTION_OBJECT ? 'tabactive' : 'tabinactive');
                                $this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilpaymentobjectgui'));
                                $this->tpl->setVariable("TAB_TEXT",$this->lng->txt('paya_object'));
                                $this->tpl->parseCurrentBlock();*/
                        }
                        if(ilPaymentVendors::_isVendor($this->user_obj->getId()))
                        {
                                $this->tabs_gui->addSubTabTarget('paya_trustees',
                                                                                                 $this->ctrl->getLinkTargetByClass('ilpaymenttrusteegui'),
                                                                                                 '',
                                                                                                 '',
                                                                                                 '',
                                                                                                 $this->getSection() == $this->SECTION_TRUSTEE ? true : false);
/*                              $this->tpl->setCurrentBlock("tab");
                                $this->tpl->setVariable('TAB_TYPE',$this->getSection() == $this->SECTION_TRUSTEE ? 'tabactive' : 'tabinactive');
                                $this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilpaymenttrusteegui'));
                                $this->tpl->setVariable("TAB_TEXT",$this->lng->txt('paya_trustees'));
                                $this->tpl->parseCurrentBlock();*/
                        }
                }
                if($this->getMainSection() == $this->BASE)
                {
                        $this->tabs_gui->addSubTabTarget('paya_shopping_cart',
                                                                                         $this->ctrl->getLinkTargetByClass('ilpaymentshoppingcartgui'),
                                                                                         '',
                                                                                         '',
                                                                                         '',
                                                                                         $this->getSection() == $this->SECTION_SHOPPING_CART ? true : false);
/*                      $this->tpl->setCurrentBlock("tab");
                        $this->tpl->setVariable('TAB_TYPE',$this->getSection() == $this->SECTION_SHOPPING_CART ? 'tabactive' : 'tabinactive');
                        $this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilpaymentshoppingcartgui'));
                        $this->tpl->setVariable("TAB_TEXT",$this->lng->txt('paya_shopping_cart'));
                        $this->tpl->parseCurrentBlock();*/

                        $this->tabs_gui->addSubTabTarget('paya_buyed_objects',
                                                                                         $this->ctrl->getLinkTargetByClass('ilpaymentbuyedobjectsgui'),
                                                                                         '',
                                                                                         '',
                                                                                         '',
                                                                                         $this->getSection() == $this->SECTION_BUYED_OBJECTS ? true : false);
/*                      $this->tpl->setCurrentBlock("tab");
                        $this->tpl->setVariable('TAB_TYPE',$this->getSection() == $this->SECTION_BUYED_OBJECTS ? 'tabactive' : 'tabinactive');
                        $this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilpaymentbuyedobjectsgui'));
                        $this->tpl->setVariable("TAB_TEXT",$this->lng->txt('paya_buyed_objects'));
                        $this->tpl->parseCurrentBlock();*/
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPaymentBaseGUI::__buildLocator (  ) 

Definition at line 148 of file class.ilPaymentBaseGUI.php.

References getMainSection(), and sendInfo().

Referenced by __buildStatusline().

        {
                $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
                $this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));

                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop"));
                $this->tpl->setVariable("LINK_ITEM","../ilias.php?baseClass=ilPersonalDesktopGUI");
                #$this->tpl->setVariable("LINK_ITEM", "../usr_personaldesktop.php");
                $this->tpl->parseCurrentBlock();

                switch($this->getMainSection())
                {
                        case $this->ADMIN:
                                $this->tpl->setCurrentBlock("locator_item");
                                $this->tpl->setVariable("PREFIX",'> ');
                                $this->tpl->setVariable("ITEM", $this->lng->txt("paya_locator"));
                                $this->tpl->setVariable("LINK_ITEM", "./payment_admin.php");
                                $this->tpl->parseCurrentBlock();
                                break;

                        case $this->BASE:
                                $this->tpl->setCurrentBlock("locator_item");
                                $this->tpl->setVariable("PREFIX",'> ');
                                $this->tpl->setVariable("ITEM", $this->lng->txt("pay_locator"));
                                $this->tpl->setVariable("LINK_ITEM", "./payment.php");
                                $this->tpl->parseCurrentBlock();
                                break;
                }

                // CHECK for new mail and info
                sendInfo();

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPaymentBaseGUI::__buildStatusline (  ) 

Definition at line 143 of file class.ilPaymentBaseGUI.php.

References __buildLocator().

        {
                $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
                $this->__buildLocator();
        }       

Here is the call graph for this function:

ilPaymentBaseGUI::__buildStylesheet (  ) 

Definition at line 183 of file class.ilPaymentBaseGUI.php.

References ilUtil::getJSPath(), and ilUtil::getStyleSheetLocation().

        {
                $this->tpl->setVariable("LOCATION_STYLESHEET",ilUtil::getStyleSheetLocation());
                $this->tpl->setVariable("LOCATION_JAVASCRIPT",ilUtil::getJSPath('functions.js'));
        }

Here is the call graph for this function:

ilPaymentBaseGUI::buildHeader (  ) 

Definition at line 80 of file class.ilPaymentBaseGUI.php.

References __buildButtons(), and ilUtil::getImagePath().

Referenced by ilPaymentAdminGUI::executeCommand(), and ilPaymentGUI::executeCommand().

        {
                $this->tpl->addBlockFile("CONTENT", "content", "tpl.payb_content.html");
                
                $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"),
                $this->lng->txt("personal_desktop"));
                $this->tpl->setTitle($this->lng->txt("personal_desktop"));

#               switch($this->getMainSection())
#               {
#                       case $this->ADMIN:
#                               $this->tpl->setVariable("HEADER",$this->lng->txt('paya_header'));
#                               break;

#                       case $this->BASE:
#                               $this->tpl->setVariable("HEADER",$this->lng->txt('pay_header'));
#                               break;
#               }

#               $this->__buildStylesheet();
#               $this->__buildStatusline();
                $this->__buildButtons();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPaymentBaseGUI::getMainSection (  ) 

Definition at line 75 of file class.ilPaymentBaseGUI.php.

Referenced by __buildButtons(), and __buildLocator().

        {
                return $this->main_section;
        }

Here is the caller graph for this function:

ilPaymentBaseGUI::getSection (  ) 

Definition at line 67 of file class.ilPaymentBaseGUI.php.

Referenced by __buildButtons().

        {
                return $this->section;
        }

Here is the caller graph for this function:

ilPaymentBaseGUI::ilPaymentBaseGUI (  ) 

Definition at line 39 of file class.ilPaymentBaseGUI.php.

References $ilias, $lng, $rbacsystem, and $tpl.

Referenced by ilPaymentAdminGUI::ilPaymentAdminGUI(), ilPaymentBillAdminGUI::ilPaymentBillAdminGUI(), ilPaymentBuyedObjectsGUI::ilPaymentBuyedObjectsGUI(), ilPaymentGUI::ilPaymentGUI(), ilPaymentObjectGUI::ilPaymentObjectGUI(), ilPaymentShoppingCartGUI::ilPaymentShoppingCartGUI(), ilPaymentStatisticGUI::ilPaymentStatisticGUI(), and ilPaymentTrusteeGUI::ilPaymentTrusteeGUI().

        {

                global $ilias,$ilDB,$lng,$tpl,$rbacsystem,$ilTabs;

                $this->ilias =& $ilias;
                $this->db =& $ilDB;
                $this->lng =& $lng;
                $this->tpl =& $tpl;

                $this->tabs_gui =& $ilTabs;

                $this->SECTION_STATISTIC = 1;
                $this->SECTION_OBJECT = 2;
                $this->SECTION_TRUSTEE = 3;
                $this->SECTION_SHOPPING_CART = 4;
                $this->SECTION_BUYED_OBJECTS = 5;

                $this->ADMIN = 4;
                $this->BASE = 5;

                $this->lng->loadLanguageModule('payment');
        }

Here is the caller graph for this function:

& ilPaymentBaseGUI::initTableGUI (  ) 
ilPaymentBaseGUI::setMainSection ( a_main_section  ) 

Definition at line 71 of file class.ilPaymentBaseGUI.php.

Referenced by ilPaymentAdminGUI::ilPaymentAdminGUI(), and ilPaymentGUI::ilPaymentGUI().

        {
                $this->main_section = $a_main_section;
        }

Here is the caller graph for this function:

ilPaymentBaseGUI::setSection ( a_section  ) 

Definition at line 63 of file class.ilPaymentBaseGUI.php.

Referenced by ilPaymentAdminGUI::executeCommand(), and ilPaymentGUI::executeCommand().

        {
                $this->section = $a_section;
        }

Here is the caller graph for this function:

ilPaymentBaseGUI::setTableGUIBasicData ( &$  tbl,
&$  result_set,
a_default_order_column = '' 
)

Definition at line 125 of file class.ilPaymentBaseGUI.php.

References $_GET, and $tbl.

Referenced by ilPaymentTrusteeGUI::__showSearchUserTable(), ilPaymentStatisticGUI::__showSearchUserTable(), and ilPaymentTrusteeGUI::__showTrusteesTable().

        {
                $offset = $_GET["offset"];
                $order = $_GET["sort_by"];
                $direction = $_GET["sort_order"];

                $tbl->setOrderColumn($order,$a_default_order_column);
                $tbl->setOrderDirection($direction);
                $tbl->setOffset($offset);
                $tbl->setLimit($_GET["limit"]);
                $tbl->setMaxCount(count($result_set));
                $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
                $tbl->setData($result_set);
        }

Here is the caller graph for this function:

ilPaymentBaseGUI::showButton ( a_cmd,
a_text,
a_target = '' 
)

Definition at line 104 of file class.ilPaymentBaseGUI.php.

Referenced by ilPaymentBillAdminGUI::__showButtons(), ilPaymentObjectGUI::__showPayMethodLink(), ilPaymentStatisticGUI::addCustomer(), ilPaymentObjectGUI::addPrice(), ilPaymentObjectGUI::editDetails(), ilPaymentObjectGUI::editPrices(), ilPaymentStatisticGUI::editStatistic(), ilPaymentTrusteeGUI::performSearch(), ilPaymentStatisticGUI::performSearch(), ilPaymentTrusteeGUI::searchUser(), ilPaymentStatisticGUI::searchUser(), ilPaymentObjectGUI::showObjects(), ilPaymentStatisticGUI::showObjectSelector(), ilPaymentObjectGUI::showObjectSelector(), ilPaymentObjectGUI::showSelectedObject(), ilPaymentStatisticGUI::showStatistics(), and ilPaymentTrusteeGUI::showTrustees().

        {
                $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
                
                // display button
                $this->tpl->setCurrentBlock("btn_cell");
                $this->tpl->setVariable("BTN_LINK",$this->ctrl->getLinkTarget($this,$a_cmd));
                $this->tpl->setVariable("BTN_TXT",$a_text);
                if($a_target)
                {
                        $this->tpl->setVariable("BTN_TARGET",$a_target);
                }

                $this->tpl->parseCurrentBlock();
        }

Here is the caller graph for this function:


Field Documentation

ilPaymentBaseGUI::$db

Definition at line 29 of file class.ilPaymentBaseGUI.php.

ilPaymentBaseGUI::$ilias
ilPaymentBaseGUI::$lng
ilPaymentBaseGUI::$main_section

Definition at line 37 of file class.ilPaymentBaseGUI.php.

ilPaymentBaseGUI::$rbacsystem

Definition at line 31 of file class.ilPaymentBaseGUI.php.

Referenced by ilPaymentBaseGUI().

ilPaymentBaseGUI::$section

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

ilPaymentBaseGUI::$tabs_gui

Definition at line 32 of file class.ilPaymentBaseGUI.php.

ilPaymentBaseGUI::$tpl
ilPaymentBaseGUI::$user_obj

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