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

Class ilTermsConditionsGUI. More...

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

Public Member Functions

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

Data Fields

const SHOP_PAGE_EDITOR_PAGE_ID = 99999997

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

Constructor & Destructor Documentation

ilTermsConditionsGUI::__construct ( )

Reimplemented from ilShopBaseGUI.

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

Member Function Documentation

ilTermsConditionsGUI::executeCommand ( )

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

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

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilshoppagegui':
$this->prepareOutput();
if($ret != '')
{
$this->tpl->setContent($ret);
}
break;
default:
if(!$cmd)
{
$cmd = 'showInfo';
}
$this->prepareOutput();
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilTermsConditionsGUI::forwardToPageObject ( )

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

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

Referenced by executeCommand().

{
global $lng, $ilTabs;
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt('back'), $this->ctrl->getLinkTarget($this), '_top');
// page object
include_once 'Services/Payment/classes/class.ilShopPage.php';
include_once 'Services/Payment/classes/class.ilShopPageGUI.php';
$lng->loadLanguageModule('content');
include_once('./Services/Style/classes/class.ilObjStyleSheet.php');
$this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
if(!ilShopPage::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID))
{
// doesn't exist -> create new one
$new_page_object = new ilShopPage();
$new_page_object->setParentId(0);
$new_page_object->setId(self::SHOP_PAGE_EDITOR_PAGE_ID);
$new_page_object->createFromXML();
}
$this->ctrl->setReturnByClass('ilshoppagegui', 'edit');
$page_gui = new ilShopPageGUI(self::SHOP_PAGE_EDITOR_PAGE_ID);
return $this->ctrl->forwardCommand($page_gui);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTermsConditionsGUI::getPageHTML ( )

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

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

Referenced by showInfo().

{
// page object
include_once 'Services/Payment/classes/class.ilShopPage.php';
include_once 'Services/Payment/classes/class.ilShopPageGUI.php';
// if page does not exist, return nothing
if(!ilShopPage::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID))
{
return '';
}
include_once 'Services/Style/classes/class.ilObjStyleSheet.php';
$this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
// get page object
$page_gui = new ilShopPageGUI(self::SHOP_PAGE_EDITOR_PAGE_ID);
return $page_gui->showPage();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTermsConditionsGUI::prepareOutput ( )
protected

Reimplemented from ilShopBaseGUI.

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

Referenced by executeCommand().

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

+ Here is the caller graph for this function:

ilTermsConditionsGUI::showInfo ( )

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

References $ilUser, and getPageHTML().

{
global $ilUser, $rbacreview, $ilToolbar;
if($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID))
{
$ilToolbar->addButton($this->lng->txt('edit_page'), $this->ctrl->getLinkTargetByClass(array('ilshoppagegui'), 'edit'));
}
$this->tpl->setVariable('ADM_CONTENT', $this->getPageHTML());
}

+ Here is the call graph for this function:

Field Documentation

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: