ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilTermsConditionsGUI Class Reference

Class ilTermsConditionsGUI. More...

+ Inheritance diagram for ilTermsConditionsGUI:
+ Collaboration diagram for ilTermsConditionsGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 getPageHTML ()
 
 forwardToPageObject ()
 
 showInfo ()
 
 __construct ()
 

Data Fields

const SHOP_PAGE_EDITOR_PAGE_ID = 99999997
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTermsConditionsGUI::__construct ( )

Reimplemented from ilShopBaseGUI.

Definition at line 20 of file class.ilTermsConditionsGUI.php.

21 {
22 parent::__construct();
23 }

Member Function Documentation

◆ executeCommand()

ilTermsConditionsGUI::executeCommand ( )

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

26 {
27 $next_class = $this->ctrl->getNextClass($this);
28 $cmd = $this->ctrl->getCmd();
29
30 switch($next_class)
31 {
32 case 'ilshoppagegui':
33 $this->prepareOutput();
34 $ret = $this->forwardToPageObject();
35 if($ret != '')
36 {
37 $this->tpl->setContent($ret);
38 }
39 break;
40 default:
41 if(!$cmd)
42 {
43 $cmd = 'showInfo';
44 }
45 $this->prepareOutput();
46 $this->$cmd();
47
48 break;
49 }
50
51 return true;
52 }
$cmd
Definition: sahs_server.php:35

References $cmd, $ret, forwardToPageObject(), and prepareOutput().

+ Here is the call graph for this function:

◆ forwardToPageObject()

ilTermsConditionsGUI::forwardToPageObject ( )

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

76 {
77 global $lng, $ilTabs;
78
79 $ilTabs->clearTargets();
80 $ilTabs->setBackTarget($lng->txt('back'), $this->ctrl->getLinkTarget($this), '_top');
81
82 // page object
83 include_once 'Services/Payment/classes/class.ilShopPage.php';
84 include_once 'Services/Payment/classes/class.ilShopPageGUI.php';
85
86 $lng->loadLanguageModule('content');
87
88 include_once('./Services/Style/classes/class.ilObjStyleSheet.php');
89 $this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
90
91 if(!ilShopPage::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID))
92 {
93 // doesn't exist -> create new one
94 $new_page_object = new ilShopPage();
95 $new_page_object->setParentId(0);
96 $new_page_object->setId(self::SHOP_PAGE_EDITOR_PAGE_ID);
97 $new_page_object->createFromXML();
98 }
99
100 $this->ctrl->setReturnByClass('ilshoppagegui', 'edit');
101
102 $page_gui = new ilShopPageGUI(self::SHOP_PAGE_EDITOR_PAGE_ID);
103
104 return $this->ctrl->forwardCommand($page_gui);
105 }
getContentStylePath($a_style_id)
get content style path
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Shop page GUI class.
Shop page object.

References ilShopBaseGUI\$lng, ilPageObject\_exists(), and ilObjStyleSheet\getContentStylePath().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPageHTML()

ilTermsConditionsGUI::getPageHTML ( )

Definition at line 54 of file class.ilTermsConditionsGUI.php.

55 {
56 // page object
57 include_once 'Services/Payment/classes/class.ilShopPage.php';
58 include_once 'Services/Payment/classes/class.ilShopPageGUI.php';
59
60 // if page does not exist, return nothing
61 if(!ilShopPage::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID))
62 {
63 return '';
64 }
65
66 include_once 'Services/Style/classes/class.ilObjStyleSheet.php';
67 $this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
68
69 // get page object
70 $page_gui = new ilShopPageGUI(self::SHOP_PAGE_EDITOR_PAGE_ID);
71
72 return $page_gui->showPage();
73 }

References ilPageObject\_exists(), and ilObjStyleSheet\getContentStylePath().

Referenced by showInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilTermsConditionsGUI::prepareOutput ( )
protected

Reimplemented from ilShopBaseGUI.

Definition at line 119 of file class.ilTermsConditionsGUI.php.

120 {
121 global $ilTabs;
122
123 parent::prepareOutput();
124
125 $ilTabs->setTabActive('terms_conditions');
126 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ showInfo()

ilTermsConditionsGUI::showInfo ( )

Definition at line 107 of file class.ilTermsConditionsGUI.php.

108 {
109 global $ilUser, $rbacreview, $ilToolbar;
110
111 if($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID))
112 {
113 $ilToolbar->addButton($this->lng->txt('edit_page'), $this->ctrl->getLinkTargetByClass(array('ilshoppagegui'), 'edit'));
114 }
115
116 $this->tpl->setVariable('ADM_CONTENT', $this->getPageHTML());
117 }
global $ilUser
Definition: imgupload.php:15

References $ilUser, and getPageHTML().

+ Here is the call graph for this function:

Field Documentation

◆ SHOP_PAGE_EDITOR_PAGE_ID

const ilTermsConditionsGUI::SHOP_PAGE_EDITOR_PAGE_ID = 99999997

Definition at line 18 of file class.ilTermsConditionsGUI.php.


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