classname
stringlengths 2
79
⌀ | method_name
stringlengths 3
5.05k
| description
stringlengths 6
3.95k
| method_code
stringlengths 7
8.51k
⌀ | explanation
stringclasses 1
value |
---|---|---|---|---|
MTShopManufacturerDetails | GetRequirements | * {@inheritdoc} | parent::GetRequirements($oRequirements);
$oRequirements->NeedsSourceObject('oObject', 'TdbShopManufacturer', $this->oActiveManufacturer); | - |
MTShopManufacturerDetails | Accept | * {@inheritdoc} | $oManufacturer = $oVisitor->GetSourceObject('oObject');
$oVisitor->SetMappedValue('oObject', $oManufacturer);
if ($oManufacturer && $bCachingEnabled) {
$oCacheTriggerManager->addTrigger($oManufacturer->table, $oManufacturer->id); | - |
MTShopManufacturerDetails | _AllowCache | * {@inheritdoc} | return true; | - |
MTShopManufacturerDetails | _GetCacheParameters | * {@inheritdoc} | $parameters = parent::_GetCacheParameters();
if ($this->oActiveManufacturer) {
$parameters['sManufacturerId'] = $this->oActiveManufacturer->id; | - |
MTShopOrderHistory | Accept | * {@inheritdoc} | $oUser = TdbDataExtranetUser::GetInstance();
$oVisitor->SetMappedValue('sDetailLinkCaption', 'Details');
if (null === $oUser->id) {
return; | - |
MTShopOrderHistory | _AllowCache | * get the value list for the whole order list.
*
* @param TdbShopOrderList $oOrderList
* @param bool $bCachingEnabled
* @param IMapperCacheTriggerRestricted $oCacheTriggerManager
*
* @return array | return false; | - |
MTFooterCategory | Accept | * To map values from models to views the mapper has to implement iVisitable.
* The ViewRender will pass a prepared MapperVisitor instance to the mapper.
*
* The mapper has to fill the values it is responsible for in the visitor.
*
* example:
*
* $foo = $oVisitor->GetSourceObject("foomodel")->GetFoo();
* $oVisitor->SetMapperValue("foo", $foo);
*
*
* To be able to access the desired source object in the visitor, the mapper has
* to declare this requirement in its GetRequirements method (see IViewMapper)
*
* @param \IMapperVisitorRestricted $oVisitor
* @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger
* @param IMapperCacheTriggerRestricted $oCacheTriggerManager | $oCacheTriggerManager->addTrigger('pkg_shop_footer_category');
$oFooterList = TdbPkgShopFooterCategoryList::GetListForShopId($this->getShopService()->getId());
$aTree = array();
while ($oFooter = $oFooterList->Next()) {
$aTree[] = $this->getSubNavi($oFooter); | - |
MTFooterCategory | _GetCacheParameters | * @param TdbPkgShopFooterCategory $oFooter
*
* @return array | $parameters = parent::_GetCacheParameters();
if (!is_array($parameters)) {
$parameters = array(); | - |
MTFooterCategory | _AllowCache | * {@inheritdoc} | return true; | - |
MTShopArticleCatalogCoreEndPoint | __sleep | * the Produkt catalog -> shows all articles of a given category, and the detail item view...
* IMPORTANT: do not extend this class. instead extend from MTShopArticleCatalogCore.
*
* @deprecated since 6.2.0 - no longer used.
* | $aSleep = parent::__sleep();
$aSleep[] = 'iPage';
$aSleep[] = 'iPageSize';
$aSleep[] = 'iItemId';
$aSleep[] = 'iCategoryId';
$aSleep[] = 'aFilter';
$aSleep[] = 'iActiveShopModuleArticlelistOrderbyId';
return $aSleep; | - |
MTShopArticleCatalogCoreEndPoint | ChangePage | * current page.
*
* @var int | null | - |
MTShopArticleCatalogCoreEndPoint | ChangePageAjax | * number of records per page.
*
* @var int | $oResponse = new MTShopArticleListResponse();
/** @var $oResponse MTShopArticleListResponse */
if (null === $iListIdent) {
$oGlobal = TGlobal::instance();
$iListIdent = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME); | - |
MTShopArticleCatalogCoreEndPoint | Init | * current item.
*
* @var string | parent::Init();
$this->oModuleConf = TdbShopArticleCatalogConf::GetNewInstance();
$this->oModuleConf->LoadFromField('cms_tpl_module_instance_id', $this->instanceID);
$this->iPageSize = $this->GetActivePageSize();
$oCategory = TdbShop::GetActiveCategory();
if (is_object($oCategory)) {
$this->iActiveShopModuleArticlelistOrderbyId = $this->oModuleConf->GetDefaultOrderBy($oCategory); | - |
MTShopArticleCatalogCoreEndPoint | Execute | * current category - if not set and an item is set, then the items primary category will be used.
* if neither item nor category is set, then the first root category will be used.
*
* @var string | parent::Execute();
// Initialize objects
$this->data['oActiveCategory'] = self::GetActiveCategory();
$this->data['oActiveArticle'] = self::GetActiveItem();
$this->data['oModuleConf'] = $this->oModuleConf;
// load list...
if (!is_null($this->data['oActiveArticle'])) {
// show detail page if we have an active article
$this->ViewArticleHook(); | - |
MTShopArticleCatalogCoreEndPoint | WriteReview | * holds the current order by id.
*
* @var string | // validate user input...
$bDataValide = false;
$oMsgManager = TCMSMessageManager::GetInstance();
$oGlobal = TGlobal::instance();
$aUserData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME);
if (is_array($aUserData)) {
$bDataValide = true;
$sCaptcha = '';
if (array_key_exists('captcha', $aUserData)) {
$sCaptcha = trim($aUserData['captcha']); | - |
MTShopArticleCatalogCoreEndPoint | GetActiveShopModuleArticlelistOrderbyId | * any filter restrictions for the list.
*
* @var array | $iActiveShopModuleArticlelistOrderbyId = null;
$oGlobal = TGlobal::instance();
if ($oGlobal->UserDataExists(self::URL_ORDER_BY)) {
/** @var string $iActiveShopModuleArticlelistOrderbyId */
$iActiveShopModuleArticlelistOrderbyId = $oGlobal->GetUserData(self::URL_ORDER_BY); | - |
MTShopArticleCatalogCoreEndPoint | GetActiveOrderByString | * the current article list.
*
* @var TdbShopArticleList | static $oOrderBy = null;
if (is_null($oOrderBy)) {
// remove default order by - for performance reason we should be allowed to sort by nothing
$sOrder = ''; //`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC';
$iActiveShopModuleArticlelistOrderbyId = $this->GetActiveShopModuleArticlelistOrderbyId($sInstanceId);
if (is_null($iActiveShopModuleArticlelistOrderbyId)) {
$iActiveShopModuleArticlelistOrderbyId = $sDefaultActiveShopModuleArticlelistOrderbyId; | - |
MTShopArticleCatalogCoreEndPoint | _AllowCache | * set this to false if you need to prevent caching of the list/item.
*
* @var bool | return false; // we currently cannot cache the list, since each list has a unique state key per user which would be include in the cached result (#26067) | - |
MTShopArticleCatalogCoreEndPoint | _GetCacheParameters | * module conf data.
*
* @var TdbShopArticleCatalogConf | $parameters = parent::_GetCacheParameters();
$parameters['sActivePageId'] = $this->getActivePageService()->getActivePage()->id;
$parameters['iPage'] = $this->iPage;
$parameters['iActiveShopModuleArticlelistOrderbyId'] = $this->iActiveShopModuleArticlelistOrderbyId;
$parameters['iPageSize'] = $this->iPageSize;
$parameters['iItemId'] = $this->iItemId;
$parameters['iCategoryId'] = $this->iCategoryId;
$parameters['aFilter'] = md5(serialize($this->aFilter));
$aAdditionalParameters = TdbShopArticleList::GetGlobalArticleListCacheKeyParameters();
if (count($aAdditionalParameters)) {
foreach ($aAdditionalParameters as $sKey => $sVal) {
$parameters[$sKey] = $sVal; | - |
MTShopArticleCatalogCoreEndPoint | _GetCacheTableInfos | * add your custom methods as array to $this->methodCallAllowed here
* to allow them to be called from web. | $aClearCacheInfo = parent::_GetCacheTableInfos();
if (!is_array($aClearCacheInfo)) {
$aClearCacheInfo = array(); | - |
MTShopBasketCoreEndpoint | Init | * The module manages access to the basket object.
* IMPORTANT: do not extend directly form this class. use the "cms Klassen-vererbungsmanager" (pkg_cms_class_manager) instead
* or, if you have to, extend from "MTShopBasketCore".
/* | parent::Init();
// load affiliate code if passed as param
$oShop = TdbShop::GetInstance();
$oGlobal = TGlobal::instance();
if ($oGlobal->UserDataExists($oShop->fieldAffiliateParameterName)) {
$sCode = $oGlobal->GetUserData($oShop->fieldAffiliateParameterName);
if (!empty($sCode)) {
$oShop->SetAffiliateCode($sCode); | - |
MTShopBasketCoreEndpoint | Execute | * the request field names that the basket objects understands. | parent::Execute();
$this->data['oBasket'] = $this->getShopService()->getActiveBasket();
return $this->data; | - |
MTShopBasketCoreEndpoint | JumpToBasketPage | * the request field names cut into the diefferent parts. | $bJumpAsFarAsPossible = false;
if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) {
$bJumpAsFarAsPossible = true; | - |
MTShopBasketCoreEndpoint | TransferFromNoticeList | * @var null|bool | $oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) {
$aIdList = $aRequestData[self::URL_ITEM_ID_NAME];
if (!is_array($aIdList)) {
$aIdList = array($aIdList); | - |
MTShopBasketCoreEndpoint | RemoveFromNoticeListAjax | * clear all products from the basket and redirect to active page.
*
* @return void | return $this->RemoveFromNoticeList($aArticleIdsToMove, $sMessageHandler, $bIsInteralCall, true); | - |
MTShopBasketCoreEndpoint | RemoveFromNoticeList | * method looks for affiliate parter codes passed to the website (if none are set yet).
* if a code is found, it is stored in the session. note: we check only ONCE for a session
* if suche a code is passed!
*
* @return void | $oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) {
$aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME];
if (!is_array($aArticleIdsToMove)) {
$aArticleIdsToMove = array($aArticleIdsToMove); | - |
MTShopBasketCoreEndpoint | TransferToNoticeList | * {@inheritdoc} | $this->RemoveFromBasket($iArticleId, $sMessageHandler, true);
$this->AddToNoticeList($iArticleId, $iAmount, $sMessageHandler, $bIsInternalCall); | - |
MTShopBasketCoreEndpoint | AddToNoticeList | * call the method to jump to the basket detail page. it will store the calling URL in the session, so
* that it becomes possible to jump back to this page from the basket.
*
* @throws RouteNotFoundException
*
* @return void | $oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (is_null($iArticleId) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) {
$iArticleId = $aRequestData[self::URL_ITEM_ID_NAME];
if (empty($iArticleId)) {
$iArticleId = null; | - |
MTShopBasketCoreEndpoint | RemoveVoucher | @var $oNode TCMSTreeNode | $oMessageManager = TCMSMessageManager::GetInstance();
$aBasketData = $this->global->GetUserData(self::URL_REQUEST_PARAMETER);
$bWasRemoved = true;
if (is_null($sBasketVoucherKey) && array_key_exists(self::URL_VOUCHER_BASKET_KEY, $aBasketData)) {
$sBasketVoucherKey = $aBasketData[self::URL_VOUCHER_BASKET_KEY]; | - |
MTShopBasketCoreEndpoint | AddToBasket | * returns the url to the current page.
*
* @return string | $this->UpdateBasketItem($aRequestData, true); | - |
MTShopBasketCoreEndpoint | AddToBasketAjax | * moves an item from the notice list to the basket
* $aArticleIdsToMove should have the form 'id'=>amount
* any data not passed as a parameter is fetched from get/post
* the data passed via get/post such as self::URL_ITEM_ID can be an array or a value.
* example: <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_ID)?>[]" value="<?=TGlobal::OutHTML($iArticleId)?>" />
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_AMOUNT)?>[<?=TGlobal::OutHTML($iArticleId)?>]" value="2" />
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_ID)?>[]" value="<?=TGlobal::OutHTML($iArticleId2)?>" />
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_AMOUNT)?>[<?=TGlobal::OutHTML($iArticleId2)?>]" value="1" />
* or, if you only want to transfer one item:
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_ID)?>" value="<?=TGlobal::OutHTML($iArticleId)?>" />
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ITEM_AMOUNT)?>" value="1" />.
*
* by default the articles will be removed from the notice list. if you want to keep some of them, make sure to add the following
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ACTION)?>" value="copy" />
* OR
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ACTION)?>[<?=TGlobal::OutHTML($iArticleId)?>]" value="copy" />
* <input type="hidden" name="<?=TGlobal::OutHTML(MTShopBasketCore::URL_ACTION)?>[<?=TGlobal::OutHTML($iArticleId2)?>]" value="move" />
* if you are moving more than one, and want to keep the first and move the second
*
* @param array<string, int> $aArticleIdsToMove
* @param array<string, string> $aKeepOnNoticeList
* @param string $sMessageHandler
*
* @return void | $this->UpdateBasketItem(null, true, true, true);
// we do not redirect - so we need to recalculate basket by hand
$oBasket = TShopBasket::GetInstance();
$oBasket->RecalculateBasket();
$oResponse = new stdClass();
$oResponse->sNotificationWindow = TTools::CallModule('MTShopBasket', 'system');
$oResponse->sMiniBasket = TTools::CallModule('MTShopBasket', 'mini');
return $oResponse; | - |
MTShopBasketCoreEndpoint | UpdateBasketItems | * @param array $aArticleIdsToMove
* @param string $sMessageHandler
* @param bool $bIsInteralCall
*
* @return null|array<string, string> | $oMessage = TCMSMessageManager::GetInstance();
$oGlobal = TGlobal::instance();
if (is_null($aRequestData)) {
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); | - |
MTShopBasketCoreEndpoint | RemoveFromBasket | * remove item from notice list.
*
* @param array $aArticleIdsToMove
* @param string $sMessageHandler
* @param bool $bIsInteralCall
* @param bool $bIsAjaxCall
*
* @return null|array<string, string> | $oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (!is_array($aRequestData)) {
$aRequestData = array(); | - |
MTShopBasketCoreEndpoint | UpdateBasketItem | @var $oArticle TdbShopArticle | $request = $this->getCurrentRequest();
if (null === $request || false === $request->hasSession()) {
return false; | - |
MTShopBasketCoreEndpoint | _AllowCache | * moves or copies one or more articles from the basket to the notice list. products to be moved must be passed.
*
* @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post
* @param int $iAmount - amount to add
* @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post)
* @param bool $bIsInternalCall
*
* @return void | if (0 != TShopBasket::GetInstance()->iTotalNumberOfUniqueArticles) {
return false; | - |
MTShopBasketCoreEndpoint | GetHtmlHeadIncludes | * insert an item into the notice list.
*
* @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post
* @param int $iAmount - amount to add
* @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post)
* @param bool $bIsInternalCall
*
* @return void | $aIncludes = parent::GetHtmlHeadIncludes();
$aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket'));
$aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/userInput'));
return $aIncludes; | - |
MTShopBasketCoreEndpoint | GetPostRenderVariables: array | @var $oItem TdbShopArticle | $variables = parent::GetPostRenderVariables();
$variables['basketUrl'] = $this->getShopService()->getBasketLink(false);
return $variables; | - |
MTShopBreadcrumbCore | Execute | @var $breadcrumb TCMSPageBreadcrumb | parent::Execute();
$oShop = TdbShop::GetInstance();
$oActiveCategory = $oShop->GetActiveCategory();
$oActiveItem = $oShop->GetActiveItem();
// if we have an active category... generate path there
if (!is_null($oActiveCategory) || !is_null($oActiveItem)) {
// we want to use the normal breadcrum view... so we need to generate a breadcrumb class that can simulate the required methos (getlink, gettarget and getname)
$breadcrumb = new TCMSPageBreadcrumb();
/** @var $breadcrumb TCMSPageBreadcrumb */
$aList = array();
if (!is_null($oActiveCategory)) {
$aCatPath = TdbShop::GetActiveCategoryPath();
foreach (array_keys($aCatPath) as $iCatId) {
$oItem = new TShopBreadcrumbItemCategory();
/** @var $oItem TShopBreadcrumbItemCategory */
$oItem->oItem = $aCatPath[$iCatId];
$aList[] = $oItem; | - |
MTShopBreadcrumbCore | _GetCacheParameters | @var $oItem TShopBreadcrumbItemCategory | $aParameters = parent::_GetCacheParameters();
$oShop = TdbShop::GetInstance();
$oActiveCategory = $oShop->GetActiveCategory();
$oActiveItem = $oShop->GetActiveItem();
if (!is_null($oActiveCategory)) {
$aParameters['iactivecategoryid'] = $oActiveCategory->id; | - |
MTShopBreadcrumbCore | _GetCacheTableInfos | @var $oItem TShopBreadcrumbItemArticle | $aTables = parent::_GetCacheTableInfos();
$oShop = TdbShop::GetInstance();
$oActiveCategory = $oShop->GetActiveCategory();
$oActiveItem = $oShop->GetActiveItem();
if (!is_null($oActiveCategory)) {
$aTables[] = array('table' => 'shop_category', 'id' => ''); | - |
MTShopCentralHandlerCoreEndPoint | Init | * exposes methods that should be callable from all shop modules (via ajax or via get/post)
* IMPORTANT: do not extend this class. instead extend from MTShopCentralHandlerCore.
/* | parent::Init();
$this->aUserData = $this->global->GetUserData(self::URL_DATA);
if (!is_array($this->aUserData)) {
$this->aUserData = array(); | - |
MTShopCentralHandlerCoreEndPoint | _AllowCache | * @var string|null | return true; | - |
MTShopCentralHandlerCoreEndPoint | GetHtmlHeadIncludes | * @var array | $aIncludes = parent::GetHtmlHeadIncludes();
$aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket'));
return $aIncludes; | - |
MTShopInfoCore | Execute | * module displays the contents of shop_system_info for one or more shop info items.
/* | parent::Execute();
$this->data['oConf'] = $this->GetModuleConfig();
$this->data['oInfos'] = $this->data['oConf']->GetFieldShopSystemInfoList('name');
return $this->data; | - |
MTShopInfoCore | _AllowCache | * the config data for the module instance.
*
* @var TdbShopSystemInfoModuleConfig | return true; | - |
MTShopInfoCore | _GetCacheParameters | * return config record for modul instance.
*
* @return TdbShopSystemInfoModuleConfig|null | $parameters = parent::_GetCacheParameters();
$parameters['instanceID'] = $this->instanceID;
return $parameters; | - |
MTShopInfoCore | _GetCacheTableInfos | * prevent caching if there are messages.
*
* @return bool | $aClearCacheInfo = parent::_GetCacheTableInfos();
$oConf = $this->GetModuleConfig();
if (!is_null($oConf)) {
$aClearCacheInfo[] = array('table' => $oConf->table, 'id' => $oConf->id);
$aIDList = $oConf->GetMLTIdList('shop_system_info');
foreach ($aIDList as $infoPageId) {
$aClearCacheInfo[] = array('table' => 'shop_system_info', 'id' => $infoPageId); | - |
MTShopManufacturerArticleCatalogCore | Init | * module is used to show the products for one manufacturer. | parent::Init();
if ($this->global->UserDataExists(self::URL_MANUFACTURER_ID)) {
$this->iActiveManufacturerId = $this->global->GetUserData(self::URL_MANUFACTURER_ID); | - |
MTShopManufacturerArticleCatalogCore | Execute | * @var string|null | parent::Execute();
$this->LoadManufacturer();
$this->data['oManufacturer'] = $this->oActiveManufacturer;
if (is_null($this->oActiveManufacturer)) {
$this->ManufacturerNotFoundHook(); | - |
MTShopManufacturerArticleCatalogCore | _GetCacheParameters | * current active manufacturer.
*
* @var TdbShopManufacturer|null | $parameters = parent::_GetCacheParameters();
$parameters['iActiveManufacturerId'] = $this->iActiveManufacturerId;
return $parameters; | - |
MTShopManufacturerArticleCatalogCore | GetHtmlHeadIncludes | * load manufacturer and related data.
*
* @return void | $aIncludes = parent::GetHtmlHeadIncludes();
if (!is_array($aIncludes)) {
$aIncludes = array(); | - |
MTShopManufacturerCore | Init | * id of manufacturer.
*
* @var string|null | parent::Init();
$oGlobal = TGlobal::instance();
$this->iActiveItemId = $oGlobal->GetUserData(self::URL_ITEM_ID_NAME);
if (empty($this->iActiveItemId)) {
$this->iActiveItemId = null; | - |
MTShopManufacturerCore | Execute | @var $oConfig TdbShopManufacturerModuleConf | parent::Execute();
$this->data['oManufacturerList'] = TdbShopManufacturerList::GetList();
$oConfig = TdbShopManufacturerModuleConf::GetNewInstance();
/** @var $oConfig TdbShopManufacturerModuleConf */
if (!$oConfig->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) {
$oConfig = null; | - |
MTShopManufacturerCore | GenerateModuleNavigation | * @return void | $aItems = array();
$oManufacturerList = TdbShopManufacturerList::GetList();
$oManufacturerList->GoToStart();
$iActiveItem = 0;
$iNumItems = $oManufacturerList->Length();
//firstNode, lastNode, active
while ($oManufacturer = $oManufacturerList->Next()) {
++$iActiveItem;
$aClass = array();
if (1 == $iActiveItem) {
$aClass[] = 'firstNode'; | - |
MTShopManufacturerCore | _AllowCache | @var $oItem TdbShopManufacturer | return true; | - |
MTShopManufacturerCore | _GetCacheParameters | * if this function returns true, then the result of the execute function will be cached.
*
* @return bool | $parameters = parent::_GetCacheParameters();
$parameters['iActiveItemId'] = $this->iActiveItemId;
return $parameters; | - |
MTShopManufacturerCore | _GetCacheTableInfos | * return an assoc array of parameters that describe the state of the module.
*
* @return array | $aCacheParams = parent::_GetCacheTableInfos();
if (!is_array($aCacheParams)) {
$aCacheParams = array(); | - |
could | Init | * the order wizard coordinates the different steps a user needs to complete to execute an order.
* Note: The class could have extended from MTWizardCore, however the shop ordering process
* was deemed so imported, that a new class was conceived to prevent changes in MTWizardCore from
* leaking into the process. | parent::Init();
// load current step
$sStepName = $this->global->GetUserData(self::URL_PARAM_STEP_SYSTEM_NAME);
if (TdbShopOrderStep::OrderProcessHasBeenMarkedAsCompleted() && 'thankyou' != $sStepName) {
// the order has been successfully executed... we redirect to the thank you page
// this only happens, if the user multi-klicks the send order button.
TTools::WriteLogEntry("User multi-clicked on order confirm button. auto redirecting from step [{$sStepName | - |
could | Execute | * @var TdbShopOrderStep | parent::Execute();
$this->data['oActiveOrderStep'] = $this->oActiveOrderStep;
$this->data['oSteps'] = TdbShopOrderStepList::GetNavigationStepList($this->oActiveOrderStep);
$this->data['sBasketRequestURL'] = self::GetCallingURL();
return $this->data; | - |
could | ExecuteStep | * return the url to the page that requested the order step.
*
* @return string | if (is_null($this->oActiveOrderStep)) {
return false; | - |
could | GetHtmlHeadIncludes | * save the url in the session so we can use it later to return to the calling page.
*
* @param string $sURL
*
* @return void | $aIncludes = parent::GetHtmlHeadIncludes();
if (!is_array($aIncludes)) {
$aIncludes = array(); | - |
could | GetHtmlFooterIncludes | * run a method on the step. default is ExecuteStep, but can be overwritten
* by passing the parameter $sStepMethod (if null is passed, the method will try to fetch
* the value from get/post from self::URL_PARAM_STEP_METHOD = xx.
*
* @param string|null $sStepMethod - method to execute. defaults to ExecuteStep
*
* @return false|null | $aIncludes = parent::GetHtmlFooterIncludes();
if (!is_array($aIncludes)) {
$aIncludes = array(); | - |
could | _AllowCache | * define any head includes the step needs.
*
* @return string[] | return false; | - |
MTShopPageMetaCore | _GetTitle | @var $oItem TShopBreadcrumbItemArticle | // alter the path if we have an active category or an active item
$sTitle = '';
//default SEO pattern of the page
$sTitle = $this->GetSeoPatternString();
if (strlen($sTitle) < 1) {
$oShop = TdbShop::GetInstance();
$oActiveCategory = $oShop->GetActiveCategory();
$oActiveItem = $oShop->GetActiveItem();
if (is_null($oActiveCategory) && is_null($oActiveItem)) {
$sTitle = parent::_GetTitle(); | - |
MTShopPageMetaCore | _GetCacheParameters | @var $oItem TShopBreadcrumbItemCategory | $aParameters = parent::_GetCacheParameters();
$oShop = TdbShop::GetInstance();
$oActiveCategory = $oShop->GetActiveCategory();
$oActiveItem = $oShop->GetActiveItem();
if (!is_null($oActiveCategory)) {
$aParameters['activecategoryid'] = $oActiveCategory->id; | - |
MTShopPageMetaCore | _GetCacheTableInfos | @var $oItem TShopBreadcrumbItemCategory | $tableInfo = parent::_GetCacheTableInfos();
$iarticle = '';
$oShop = TdbShop::GetInstance();
$oActiveItem = $oShop->GetActiveItem();
if (!is_null($oActiveItem)) {
$iarticle = $oActiveItem->id; | - |
MTShopSearchFormCore | Execute | * module used to render search forms.
/* | parent::Execute();
try {
$this->data['sSearchURL'] = $this->getSystemPageService()->getLinkToSystemPageRelative('search');
$this->data['q'] = $this->global->GetUserData('q');
$this->data['quicksearchUrl'] = $this->getRouter()->generateWithPrefixes('chameleon_system_shop.search_suggest'); | - |
MTShopSearchFormCore | _AllowCache | * {@inheritdoc} | return false === $this->global->UserDataExists('q'); | - |
MTShopSearchFormCore | GetHtmlHeadIncludes | * prevent caching if there are messages.
*
* @return bool | $aIncludes = parent::GetHtmlHeadIncludes();
$aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/MTShopSearchForm'));
return $aIncludes; | - |
MTShopSearchTagsCore | Execute | * module shows a tag cloud.
/* | parent::Execute();
$this->data['oCloud'] = $this->GetSearchKeywordCloud();
return $this->data; | - |
MTShopViewMyOrderDetails | Init | * @var string | parent::Init();
$this->orderIdRequested = $this->getInputFilterUtil()->getFilteredInput('id', null); | - |
MTShopViewMyOrderDetails | myOrderDetailHandlerFactory | * @return IPkgShopViewMyOrderDetails | return new TPkgShopViewMyOrderDetails($this->getDbAdapter(), $this->getSessionAdapter()); | - |
MTShopViewMyOrderDetails | GetRequirements | * {@inheritdoc} | parent::GetRequirements($oRequirements);
$oRequirements->NeedsSourceObject(
'viewOrderDetailHandler',
'IPkgShopViewMyOrderDetails',
$this->myOrderDetailHandlerFactory()
);
$oRequirements->NeedsSourceObject('orderIdRequested', 'string', $this->getInputFilterUtil()->getFilteredInput('id', null), true);
$oRequirements->NeedsSourceObject('extranetUserId', 'string', TdbDataExtranetUser::GetInstance()->id, true); | - |
MTShopViewMyOrderDetails | Accept(
IMapperVisitorRestricted $oVisitor,
$bCachingEnabled,
IMapperCacheTriggerRestricted $oCacheTriggerManager
) | @var $viewOrderDetailHandler IPkgShopViewMyOrderDetails | /** @var $viewOrderDetailHandler IPkgShopViewMyOrderDetails */
$viewOrderDetailHandler = $oVisitor->GetSourceObject('viewOrderDetailHandler');
$orderIdRequested = $oVisitor->GetSourceObject('orderIdRequested');
$extranetUserId = $oVisitor->GetSourceObject('extranetUserId');
$order = $this->getDbAdapter()->getOrder($orderIdRequested);
$viewData = array(
'error' => false,
'errorCode' => null,
'notMyOrderError' => false,
'orderNotFoundError' => false,
'order' => $order,
);
if (null === $order) {
$viewData['error'] = true;
$viewData['errorCode'] = 'orderNotFoundError'; | - |
MTShopViewMyOrderDetailsOrderObjectAsStringMapper | GetRequirements | * {@inheritdoc} | $oRequirements->NeedsSourceObject('order', 'TdbShopOrder', null, true);
$oRequirements->NeedsSourceObject('view', 'string', 'print'); | - |
MTShopViewMyOrderDetailsOrderObjectAsStringMapper | Accept(
IMapperVisitorRestricted $oVisitor,
$bCachingEnabled,
IMapperCacheTriggerRestricted $oCacheTriggerManager
) | * {@inheritdoc} | /** @var $order TdbShopOrder */
$order = $oVisitor->GetSourceObject('order');
if (null === $order) {
return; | - |
TPkgShopViewMyOrderDetails | __construct(
IPkgShopViewMyOrderDetailsDbAdapter $dbAdapter,
IPkgShopViewMyOrderDetailsSessionAdapter $sessionAdapter
) | * @var IPkgShopViewMyOrderDetailsDbAdapter | $this->dbAdapter = $dbAdapter;
$this->sessionAdapter = $sessionAdapter; | - |
TPkgShopViewMyOrderDetails | addOrderIdToMyList | * @var IPkgShopViewMyOrderDetailsSessionAdapter | if (null === $userId) {
$this->sessionAdapter->addOrderId($orderId); | - |
TPkgShopViewMyOrderDetailsDbAdapter | __construct | * @var Doctrine\DBAL\Connection | $this->dbConnection = $dbConnection; | - |
TPkgShopViewMyOrderDetailsDbAdapter | hasOrder | * {@inheritdoc} | $query = 'select COUNT(id) AS matches FROM shop_order WHERE id = :orderId AND data_extranet_user_id = :userId';
$row = $this->dbConnection->fetchNumeric($query, array('orderId' => $orderId, 'userId' => $userId));
return intval($row[0]) >= 1; | - |
TPkgShopViewMyOrderDetailsDbAdapter | getOrder | * {@inheritdoc} | $order = TdbShopOrder::GetNewInstance();
if (false === $order->Load($orderId)) {
return null; | - |
TPkgShopViewMyOrderDetailsSessionAdapter | __construct | * @var Symfony\Component\HttpFoundation\Session\SessionInterface | $this->session = $session; | - |
TPkgShopViewMyOrderDetailsSessionAdapter | addOrderId | * @param string $orderId
*
* @return bool | $orderIdList = $this->session->get(self::SESSIONNAME, array());
$orderIdList[] = $orderId;
$this->session->set(self::SESSIONNAME, $orderIdList); | - |
OrderPaymentInfo | __construct | * @var string | $this->orderId = $orderId;
$this->paymentHandlerId = $paymentHandlerId;
$this->portalId = $portalId; | - |
OrderPaymentInfo | getOrderId | * @var string | return $this->orderId; | - |
OrderPaymentInfo | getPaymentHandlerId | * @var string | return $this->paymentHandlerId; | - |
OrderPaymentInfo | getPortalId | * @param string $orderId
* @param string $paymentHandlerId
* @param string $portalId | return $this->portalId; | - |
ShopPaymentConfigLoader | __construct(
ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess,
$defaultEnvironment
) | * ShopPaymentConfigLoader loads the configuration for payment handlers.
* See the payment section in this bundle's documentation on how the configuration loading process works. | $this->shopPaymentConfigLoaderDataAccess = $shopPaymentConfigLoaderDataAccess;
$this->defaultEnvironment = $defaultEnvironment;
$this->configProviderList = array(); | - |
ShopPaymentConfigLoader | loadFromOrderId | * @var ShopPaymentConfigLoaderDataAccessInterface | try {
$orderPaymentInfo = $this->shopPaymentConfigLoaderDataAccess->getDataFromOrderId(
$orderId
);
return $this->loadFromPaymentHandlerId(
$orderPaymentInfo->getPaymentHandlerId(),
$orderPaymentInfo->getPortalId()
); | - |
ShopPaymentConfigLoader | loadFromPaymentHandlerId | * @var string | try {
$paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromPaymentHandlerId(
$paymentHandlerId
);
return $this->loadConfiguration($portalId, $paymentHandlerGroupId, $paymentHandlerId); | - |
ShopPaymentConfigLoader | loadFromPaymentHandlerGroupId | * @var ShopPaymentConfigProviderInterface[] | return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null); | - |
ShopPaymentConfigLoader | loadFromPaymentHandlerGroupSystemName | * @param ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess
* @param string $defaultEnvironment One of IPkgShopOrderPaymentConfig::ENVIRONMENT_* | try {
$paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName(
$systemName
);
return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null); | - |
ShopPaymentConfigLoader | addConfigProvider | * {@inheritdoc} | $this->configProviderList[$alias] = $shopPaymentConfigProvider; | - |
ShopPaymentConfigLoaderDatabaseAccess | __construct | * @var Connection | $this->databaseConnection = $databaseConnection; | - |
ShopPaymentConfigLoaderDatabaseAccess | getDataFromOrderId | * {@inheritdoc} | $order = TdbShopOrder::GetNewInstance();
if (!$order->Load($orderId)) {
throw new DataAccessException('Error while loading order with ID '.$orderId); | - |
ShopPaymentConfigLoaderDatabaseAccess | getPaymentHandlerGroupIdFromPaymentHandlerId | * {@inheritdoc} | $handler = TdbShopPaymentHandler::GetNewInstance();
if (!$handler->Load($paymentHandlerId)) {
throw new DataAccessException('Error while loading payment handler with ID '.$paymentHandlerId); | - |
ShopPaymentConfigLoaderDatabaseAccess | getPaymentHandlerGroupIdFromSystemName | * {@inheritdoc} | $handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance();
if (!$handlerGroup->LoadFromField('system_name', $systemName)) {
throw new DataAccessException('Error while loading payment handler group ID for systemName '.$systemName); | - |
ShopPaymentConfigLoaderDatabaseAccess | getPaymentHandlerGroupSystemNameFromId | * {@inheritdoc} | $handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance();
if (!$handlerGroup->Load($paymentHandlerGroupId)) {
throw new DataAccessException(
'Error while loading payment handler group systemName for ID '.$paymentHandlerGroupId
); | - |
ShopPaymentConfigLoaderDatabaseAccess | getEnvironment | * {@inheritdoc} | $paymentHandlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance();
if (!$paymentHandlerGroup->Load($paymentHandlerGroupId)) {
throw new DataAccessException(
'Error while loading environment for payment handler group with ID '.$paymentHandlerGroupId
); | - |
ShopPaymentConfigLoaderDatabaseAccess | loadPaymentHandlerGroupConfig | * {@inheritdoc} | $query = 'SELECT `shop_payment_handler_group_config`.`name`, `shop_payment_handler_group_config`.`value`, `shop_payment_handler_group_config`.`type`, `shop_payment_handler_group_config`.`cms_portal_id`
FROM `shop_payment_handler_group_config`
WHERE `shop_payment_handler_group_config`.`shop_payment_handler_group_id` = :shopPaymentHandlerGroupId';
try {
$configDataRaw = $this->databaseConnection->fetchAllAssociative(
$query,
array('shopPaymentHandlerGroupId' => $shopPaymentHandlerGroupId)
); | - |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.