ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilShopInfoGUI Class Reference

Class ilShopInfoGUI. More...

+ Inheritance diagram for ilShopInfoGUI:
+ Collaboration diagram for ilShopInfoGUI:

Public Member Functions

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

Data Fields

const SHOP_PAGE_EDITOR_PAGE_ID = 99999998

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

Constructor & Destructor Documentation

ilShopInfoGUI::__construct ( )

Reimplemented from ilShopBaseGUI.

Definition at line 40 of file class.ilShopInfoGUI.php.

Member Function Documentation

ilShopInfoGUI::executeCommand ( )

Definition at line 45 of file class.ilShopInfoGUI.php.

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

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilpageobjectgui':
$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:

ilShopInfoGUI::forwardToPageObject ( )

Definition at line 107 of file class.ilShopInfoGUI.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/COPage/classes/class.ilPageObject.php';
include_once 'Services/COPage/classes/class.ilPageObjectGUI.php';
$lng->loadLanguageModule('content');
include_once('./Services/Style/classes/class.ilObjStyleSheet.php');
$this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
if(!ilPageObject::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID))
{
// doesn't exist -> create new one
$new_page_object = new ilPageObject('shop');
$new_page_object->setParentId(0);
$new_page_object->setId(self::SHOP_PAGE_EDITOR_PAGE_ID);
$new_page_object->createFromXML();
}
$this->ctrl->setReturnByClass('ilpageobjectgui', 'edit');
$page_gui = new ilPageObjectGUI('shop', self::SHOP_PAGE_EDITOR_PAGE_ID);
$page_gui->setIntLinkHelpDefault('StructureObject', self::SHOP_PAGE_EDITOR_PAGE_ID);
$page_gui->setTemplateTargetVar('ADM_CONTENT');
$page_gui->setLinkXML('');
$page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'downloadFile'));
$page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'displayMediaFullscreen'));
$page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'download_paragraph'));
$page_gui->setPresentationTitle('');
$page_gui->setTemplateOutput(false);
$page_gui->setHeader('');
$page_gui->setEnabledRepositoryObjects(false);
$page_gui->setEnabledFileLists(true);
$page_gui->setEnabledMaps(true);
$page_gui->setEnabledPCTabs(true);
return $this->ctrl->forwardCommand($page_gui);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilShopInfoGUI::getPageHTML ( )

Definition at line 74 of file class.ilShopInfoGUI.php.

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

Referenced by showInfo().

{
// page object
include_once 'Services/COPage/classes/class.ilPageObject.php';
include_once 'Services/COPage/classes/class.ilPageObjectGUI.php';
// if page does not exist, return nothing
if(!ilPageObject::_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 ilPageObjectGUI('shop', self::SHOP_PAGE_EDITOR_PAGE_ID);
$page_gui->setIntLinkHelpDefault('StructureObject', self::SHOP_PAGE_EDITOR_PAGE_ID);
$page_gui->setLinkXML('');
$page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'downloadFile'));
$page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'displayMediaFullscreen'));
$page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'download_paragraph'));
$page_gui->setPresentationTitle('');
$page_gui->setTemplateOutput(false);
$page_gui->setHeader('');
$page_gui->setEnabledRepositoryObjects(false);
$page_gui->setEnabledFileLists(true);
$page_gui->setEnabledPCTabs(true);
$page_gui->setEnabledMaps(true);
return $page_gui->showPage();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilShopInfoGUI::prepareOutput ( )
protected

Reimplemented from ilShopBaseGUI.

Definition at line 164 of file class.ilShopInfoGUI.php.

Referenced by executeCommand().

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

+ Here is the caller graph for this function:

ilShopInfoGUI::showInfo ( )

Definition at line 152 of file class.ilShopInfoGUI.php.

References getPageHTML().

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

+ Here is the call graph for this function:

Field Documentation

const ilShopInfoGUI::SHOP_PAGE_EDITOR_PAGE_ID = 99999998

Definition at line 38 of file class.ilShopInfoGUI.php.


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