repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
OXID-eSales/oxideshop_ce | source/Application/Model/MdVariant.php | MdVariant.getFPrice | public function getFPrice()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// 0002030 No need to return price if it disabled for better performance.
if (!$myConfig->getConfigParam('bl_perfLoadPrice')) {
return;
}
if ($this->_sFPrice) {
return $this->_sFPrice;
}
$sFromPrefix = '';
if (!$this->_isFixedPrice()) {
$sFromPrefix = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('PRICE_FROM') . ' ';
}
$dMinPrice = $this->getMinDPrice();
$sFMinPrice = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dMinPrice);
$sCurrency = ' ' . \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject()->sign;
$this->_sFPrice = $sFromPrefix . $sFMinPrice . $sCurrency;
return $this->_sFPrice;
} | php | public function getFPrice()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
// 0002030 No need to return price if it disabled for better performance.
if (!$myConfig->getConfigParam('bl_perfLoadPrice')) {
return;
}
if ($this->_sFPrice) {
return $this->_sFPrice;
}
$sFromPrefix = '';
if (!$this->_isFixedPrice()) {
$sFromPrefix = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('PRICE_FROM') . ' ';
}
$dMinPrice = $this->getMinDPrice();
$sFMinPrice = \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($dMinPrice);
$sCurrency = ' ' . \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject()->sign;
$this->_sFPrice = $sFromPrefix . $sFMinPrice . $sCurrency;
return $this->_sFPrice;
} | [
"public",
"function",
"getFPrice",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"// 0002030 No need to return price if it disabled for better performance.",
"if",
"(",
"!",
... | Returns MD variant price as a text.
@return string | [
"Returns",
"MD",
"variant",
"price",
"as",
"a",
"text",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/MdVariant.php#L268-L292 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/UserList.php | UserList.deleteEntry | public function deleteEntry()
{
if ($this->_allowAdminEdit($this->getEditObjectId())) {
$this->_oList = null;
return parent::deleteEntry();
}
} | php | public function deleteEntry()
{
if ($this->_allowAdminEdit($this->getEditObjectId())) {
$this->_oList = null;
return parent::deleteEntry();
}
} | [
"public",
"function",
"deleteEntry",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_allowAdminEdit",
"(",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
")",
")",
"{",
"$",
"this",
"->",
"_oList",
"=",
"null",
";",
"return",
"parent",
"::",
"deleteEnt... | Admin user is allowed to be deleted only by mall admin
@return null | [
"Admin",
"user",
"is",
"allowed",
"to",
"be",
"deleted",
"only",
"by",
"mall",
"admin"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/UserList.php#L73-L80 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getPayment | public function getPayment()
{
if ($this->_oPayment === null) {
$this->_oPayment = false;
$oBasket = $this->getBasket();
$oUser = $this->getUser();
// payment is set ?
$sPaymentid = $oBasket->getPaymentId();
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
if ($sPaymentid && $oPayment->load($sPaymentid) &&
$oPayment->isValidPayment(
\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('dynvalue'),
\OxidEsales\Eshop\Core\Registry::getConfig()->getShopId(),
$oUser,
$oBasket->getPriceForPayment(),
\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet')
)
) {
$this->_oPayment = $oPayment;
}
}
return $this->_oPayment;
} | php | public function getPayment()
{
if ($this->_oPayment === null) {
$this->_oPayment = false;
$oBasket = $this->getBasket();
$oUser = $this->getUser();
// payment is set ?
$sPaymentid = $oBasket->getPaymentId();
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
if ($sPaymentid && $oPayment->load($sPaymentid) &&
$oPayment->isValidPayment(
\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('dynvalue'),
\OxidEsales\Eshop\Core\Registry::getConfig()->getShopId(),
$oUser,
$oBasket->getPriceForPayment(),
\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet')
)
) {
$this->_oPayment = $oPayment;
}
}
return $this->_oPayment;
} | [
"public",
"function",
"getPayment",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oPayment",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oPayment",
"=",
"false",
";",
"$",
"oBasket",
"=",
"$",
"this",
"->",
"getBasket",
"(",
")",
";",
"$",
"oUse... | Template variable getter. Returns payment object
@return object | [
"Template",
"variable",
"getter",
".",
"Returns",
"payment",
"object"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L240-L266 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getBasket | public function getBasket()
{
if ($this->_oBasket === null) {
$this->_oBasket = false;
if ($oBasket = $this->getSession()->getBasket()) {
$this->_oBasket = $oBasket;
}
}
return $this->_oBasket;
} | php | public function getBasket()
{
if ($this->_oBasket === null) {
$this->_oBasket = false;
if ($oBasket = $this->getSession()->getBasket()) {
$this->_oBasket = $oBasket;
}
}
return $this->_oBasket;
} | [
"public",
"function",
"getBasket",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oBasket",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oBasket",
"=",
"false",
";",
"if",
"(",
"$",
"oBasket",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
... | Template variable getter. Returns active basket
@return oxBasket | [
"Template",
"variable",
"getter",
".",
"Returns",
"active",
"basket"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L273-L283 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getOrderRemark | public function getOrderRemark()
{
if ($this->_sOrderRemark === null) {
$this->_sOrderRemark = false;
if ($sRemark = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('ordrem')) {
$this->_sOrderRemark = \OxidEsales\Eshop\Core\Registry::getConfig()->checkParamSpecialChars($sRemark);
}
}
return $this->_sOrderRemark;
} | php | public function getOrderRemark()
{
if ($this->_sOrderRemark === null) {
$this->_sOrderRemark = false;
if ($sRemark = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('ordrem')) {
$this->_sOrderRemark = \OxidEsales\Eshop\Core\Registry::getConfig()->checkParamSpecialChars($sRemark);
}
}
return $this->_sOrderRemark;
} | [
"public",
"function",
"getOrderRemark",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_sOrderRemark",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_sOrderRemark",
"=",
"false",
";",
"if",
"(",
"$",
"sRemark",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\... | Template variable getter. Returns user remark
@return string | [
"Template",
"variable",
"getter",
".",
"Returns",
"user",
"remark"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L300-L310 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getBasketArticles | public function getBasketArticles()
{
if ($this->_oBasketArtList === null) {
$this->_oBasketArtList = false;
if ($oBasket = $this->getBasket()) {
$this->_oBasketArtList = $oBasket->getBasketArticles();
}
}
return $this->_oBasketArtList;
} | php | public function getBasketArticles()
{
if ($this->_oBasketArtList === null) {
$this->_oBasketArtList = false;
if ($oBasket = $this->getBasket()) {
$this->_oBasketArtList = $oBasket->getBasketArticles();
}
}
return $this->_oBasketArtList;
} | [
"public",
"function",
"getBasketArticles",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oBasketArtList",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oBasketArtList",
"=",
"false",
";",
"if",
"(",
"$",
"oBasket",
"=",
"$",
"this",
"->",
"getBasket",
... | Template variable getter. Returns basket article list
@return object | [
"Template",
"variable",
"getter",
".",
"Returns",
"basket",
"article",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L317-L327 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getDelAddress | public function getDelAddress()
{
if ($this->_oDelAddress === null) {
$this->_oDelAddress = false;
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
$this->_oDelAddress = $oOrder->getDelAddressInfo();
}
return $this->_oDelAddress;
} | php | public function getDelAddress()
{
if ($this->_oDelAddress === null) {
$this->_oDelAddress = false;
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
$this->_oDelAddress = $oOrder->getDelAddressInfo();
}
return $this->_oDelAddress;
} | [
"public",
"function",
"getDelAddress",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oDelAddress",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oDelAddress",
"=",
"false",
";",
"$",
"oOrder",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\"... | Template variable getter. Returns delivery address
@return object | [
"Template",
"variable",
"getter",
".",
"Returns",
"delivery",
"address"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L334-L343 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getShipSet | public function getShipSet()
{
if ($this->_oShipSet === null) {
$this->_oShipSet = false;
if ($oBasket = $this->getBasket()) {
$oShipSet = oxNew(\OxidEsales\Eshop\Application\Model\DeliverySet::class);
if ($oShipSet->load($oBasket->getShippingId())) {
$this->_oShipSet = $oShipSet;
}
}
}
return $this->_oShipSet;
} | php | public function getShipSet()
{
if ($this->_oShipSet === null) {
$this->_oShipSet = false;
if ($oBasket = $this->getBasket()) {
$oShipSet = oxNew(\OxidEsales\Eshop\Application\Model\DeliverySet::class);
if ($oShipSet->load($oBasket->getShippingId())) {
$this->_oShipSet = $oShipSet;
}
}
}
return $this->_oShipSet;
} | [
"public",
"function",
"getShipSet",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oShipSet",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oShipSet",
"=",
"false",
";",
"if",
"(",
"$",
"oBasket",
"=",
"$",
"this",
"->",
"getBasket",
"(",
")",
")",... | Template variable getter. Returns shipping set
@return object | [
"Template",
"variable",
"getter",
".",
"Returns",
"shipping",
"set"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L350-L363 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.isConfirmAGBActive | public function isConfirmAGBActive()
{
if ($this->_blConfirmAGB === null) {
$this->_blConfirmAGB = false;
$this->_blConfirmAGB = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blConfirmAGB');
}
return $this->_blConfirmAGB;
} | php | public function isConfirmAGBActive()
{
if ($this->_blConfirmAGB === null) {
$this->_blConfirmAGB = false;
$this->_blConfirmAGB = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blConfirmAGB');
}
return $this->_blConfirmAGB;
} | [
"public",
"function",
"isConfirmAGBActive",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_blConfirmAGB",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_blConfirmAGB",
"=",
"false",
";",
"$",
"this",
"->",
"_blConfirmAGB",
"=",
"\\",
"OxidEsales",
"\\",
"... | Template variable getter. Returns if option "blConfirmAGB" is on
@return bool | [
"Template",
"variable",
"getter",
".",
"Returns",
"if",
"option",
"blConfirmAGB",
"is",
"on"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L370-L378 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.showOrderButtonOnTop | public function showOrderButtonOnTop()
{
if ($this->_blShowOrderButtonOnTop === null) {
$this->_blShowOrderButtonOnTop = false;
$this->_blShowOrderButtonOnTop = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blShowOrderButtonOnTop');
}
return $this->_blShowOrderButtonOnTop;
} | php | public function showOrderButtonOnTop()
{
if ($this->_blShowOrderButtonOnTop === null) {
$this->_blShowOrderButtonOnTop = false;
$this->_blShowOrderButtonOnTop = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blShowOrderButtonOnTop');
}
return $this->_blShowOrderButtonOnTop;
} | [
"public",
"function",
"showOrderButtonOnTop",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_blShowOrderButtonOnTop",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_blShowOrderButtonOnTop",
"=",
"false",
";",
"$",
"this",
"->",
"_blShowOrderButtonOnTop",
"=",
"... | Template variable getter. Returns if option "blShowOrderButtonOnTop" is on
@return bool | [
"Template",
"variable",
"getter",
".",
"Returns",
"if",
"option",
"blShowOrderButtonOnTop",
"is",
"on"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L395-L403 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController.getDeliveryAddressMD5 | public function getDeliveryAddressMD5()
{
// bill address
$oUser = $this->getUser();
$sDelAddress = $oUser->getEncodedDeliveryAddress();
// delivery address
if (\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid')) {
$oDelAdress = oxNew(\OxidEsales\Eshop\Application\Model\Address::class);
$oDelAdress->load(\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid'));
$sDelAddress .= $oDelAdress->getEncodedDeliveryAddress();
}
return $sDelAddress;
} | php | public function getDeliveryAddressMD5()
{
// bill address
$oUser = $this->getUser();
$sDelAddress = $oUser->getEncodedDeliveryAddress();
// delivery address
if (\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid')) {
$oDelAdress = oxNew(\OxidEsales\Eshop\Application\Model\Address::class);
$oDelAdress->load(\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('deladrid'));
$sDelAddress .= $oDelAdress->getEncodedDeliveryAddress();
}
return $sDelAddress;
} | [
"public",
"function",
"getDeliveryAddressMD5",
"(",
")",
"{",
"// bill address",
"$",
"oUser",
"=",
"$",
"this",
"->",
"getUser",
"(",
")",
";",
"$",
"sDelAddress",
"=",
"$",
"oUser",
"->",
"getEncodedDeliveryAddress",
"(",
")",
";",
"// delivery address",
"if... | Return users setted delivery address md5
@return string | [
"Return",
"users",
"setted",
"delivery",
"address",
"md5"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L461-L476 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/OrderController.php | OrderController._validateTermsAndConditions | protected function _validateTermsAndConditions()
{
$blValid = true;
$oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($oConfig->getConfigParam('blConfirmAGB') && !$oConfig->getRequestParameter('ord_agb')) {
$blValid = false;
}
if ($oConfig->getConfigParam('blEnableIntangibleProdAgreement')) {
$oBasket = $this->getBasket();
$blDownloadableProductsAgreement = $oConfig->getRequestParameter('oxdownloadableproductsagreement');
if ($blValid && $oBasket->hasArticlesWithDownloadableAgreement() && !$blDownloadableProductsAgreement) {
$blValid = false;
}
$blServiceProductsAgreement = $oConfig->getRequestParameter('oxserviceproductsagreement');
if ($blValid && $oBasket->hasArticlesWithIntangibleAgreement() && !$blServiceProductsAgreement) {
$blValid = false;
}
}
return $blValid;
} | php | protected function _validateTermsAndConditions()
{
$blValid = true;
$oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
if ($oConfig->getConfigParam('blConfirmAGB') && !$oConfig->getRequestParameter('ord_agb')) {
$blValid = false;
}
if ($oConfig->getConfigParam('blEnableIntangibleProdAgreement')) {
$oBasket = $this->getBasket();
$blDownloadableProductsAgreement = $oConfig->getRequestParameter('oxdownloadableproductsagreement');
if ($blValid && $oBasket->hasArticlesWithDownloadableAgreement() && !$blDownloadableProductsAgreement) {
$blValid = false;
}
$blServiceProductsAgreement = $oConfig->getRequestParameter('oxserviceproductsagreement');
if ($blValid && $oBasket->hasArticlesWithIntangibleAgreement() && !$blServiceProductsAgreement) {
$blValid = false;
}
}
return $blValid;
} | [
"protected",
"function",
"_validateTermsAndConditions",
"(",
")",
"{",
"$",
"blValid",
"=",
"true",
";",
"$",
"oConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"if",
"(",
"$",
"oConfig",
... | Validates whether necessary terms and conditions checkboxes were checked.
@return bool | [
"Validates",
"whether",
"necessary",
"terms",
"and",
"conditions",
"checkboxes",
"were",
"checked",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/OrderController.php#L541-L565 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/UserBasketItem.php | UserBasketItem.getArticle | public function getArticle($sItemKey)
{
if (!$this->oxuserbasketitems__oxartid->value) {
//this exception may not be caught, anyhow this is a critical exception
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\ArticleException::class);
$oEx->setMessage('EXCEPTION_ARTICLE_NOPRODUCTID');
throw $oEx;
}
if ($this->_oArticle === null) {
$this->_oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
// performance
/* removed due to #4178
if ( $this->_blParentBuyable ) {
$this->_oArticle->setNoVariantLoading( true );
}
*/
if (!$this->_oArticle->load($this->oxuserbasketitems__oxartid->value)) {
return false;
}
$aSelList = $this->getSelList();
if (($aSelectlist = $this->_oArticle->getSelectLists()) && is_array($aSelList)) {
foreach ($aSelList as $iKey => $iSel) {
if (isset($aSelectlist[$iKey][$iSel])) {
// cloning select list information
$aSelectlist[$iKey][$iSel] = clone $aSelectlist[$iKey][$iSel];
$aSelectlist[$iKey][$iSel]->selected = 1;
}
}
$this->_oArticle->setSelectlist($aSelectlist);
}
// generating item key
$this->_oArticle->setItemKey($sItemKey);
}
return $this->_oArticle;
} | php | public function getArticle($sItemKey)
{
if (!$this->oxuserbasketitems__oxartid->value) {
//this exception may not be caught, anyhow this is a critical exception
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\ArticleException::class);
$oEx->setMessage('EXCEPTION_ARTICLE_NOPRODUCTID');
throw $oEx;
}
if ($this->_oArticle === null) {
$this->_oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
// performance
/* removed due to #4178
if ( $this->_blParentBuyable ) {
$this->_oArticle->setNoVariantLoading( true );
}
*/
if (!$this->_oArticle->load($this->oxuserbasketitems__oxartid->value)) {
return false;
}
$aSelList = $this->getSelList();
if (($aSelectlist = $this->_oArticle->getSelectLists()) && is_array($aSelList)) {
foreach ($aSelList as $iKey => $iSel) {
if (isset($aSelectlist[$iKey][$iSel])) {
// cloning select list information
$aSelectlist[$iKey][$iSel] = clone $aSelectlist[$iKey][$iSel];
$aSelectlist[$iKey][$iSel]->selected = 1;
}
}
$this->_oArticle->setSelectlist($aSelectlist);
}
// generating item key
$this->_oArticle->setItemKey($sItemKey);
}
return $this->_oArticle;
} | [
"public",
"function",
"getArticle",
"(",
"$",
"sItemKey",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"oxuserbasketitems__oxartid",
"->",
"value",
")",
"{",
"//this exception may not be caught, anyhow this is a critical exception",
"$",
"oEx",
"=",
"oxNew",
"(",
"\... | Loads and returns the article for that basket item
@param string $sItemKey the key that will be given to oxarticle setItemKey
@throws oxArticleException article exception
@return oxArticle | [
"Loads",
"and",
"returns",
"the",
"article",
"for",
"that",
"basket",
"item"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/UserBasketItem.php#L82-L122 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/UserBasketItem.php | UserBasketItem.getSelList | public function getSelList()
{
if ($this->_aSelList == null && $this->oxuserbasketitems__oxsellist->value) {
$this->_aSelList = unserialize($this->oxuserbasketitems__oxsellist->value);
}
return $this->_aSelList;
} | php | public function getSelList()
{
if ($this->_aSelList == null && $this->oxuserbasketitems__oxsellist->value) {
$this->_aSelList = unserialize($this->oxuserbasketitems__oxsellist->value);
}
return $this->_aSelList;
} | [
"public",
"function",
"getSelList",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aSelList",
"==",
"null",
"&&",
"$",
"this",
"->",
"oxuserbasketitems__oxsellist",
"->",
"value",
")",
"{",
"$",
"this",
"->",
"_aSelList",
"=",
"unserialize",
"(",
"$",
"t... | Basket item selection list getter
@return array | [
"Basket",
"item",
"selection",
"list",
"getter"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/UserBasketItem.php#L146-L153 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/UserBasketItem.php | UserBasketItem.setSelList | public function setSelList($aSelList)
{
$this->oxuserbasketitems__oxsellist = new \OxidEsales\Eshop\Core\Field(serialize($aSelList), \OxidEsales\Eshop\Core\Field::T_RAW);
} | php | public function setSelList($aSelList)
{
$this->oxuserbasketitems__oxsellist = new \OxidEsales\Eshop\Core\Field(serialize($aSelList), \OxidEsales\Eshop\Core\Field::T_RAW);
} | [
"public",
"function",
"setSelList",
"(",
"$",
"aSelList",
")",
"{",
"$",
"this",
"->",
"oxuserbasketitems__oxsellist",
"=",
"new",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Field",
"(",
"serialize",
"(",
"$",
"aSelList",
")",
",",
"\\",
"Oxid... | Basket item selection list setter
@param array $aSelList selection list | [
"Basket",
"item",
"selection",
"list",
"setter"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/UserBasketItem.php#L160-L163 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/UserBasketItem.php | UserBasketItem.getPersParams | public function getPersParams()
{
if ($this->_aPersParam == null && $this->oxuserbasketitems__oxpersparam->value) {
$this->_aPersParam = unserialize($this->oxuserbasketitems__oxpersparam->value);
}
return $this->_aPersParam;
} | php | public function getPersParams()
{
if ($this->_aPersParam == null && $this->oxuserbasketitems__oxpersparam->value) {
$this->_aPersParam = unserialize($this->oxuserbasketitems__oxpersparam->value);
}
return $this->_aPersParam;
} | [
"public",
"function",
"getPersParams",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aPersParam",
"==",
"null",
"&&",
"$",
"this",
"->",
"oxuserbasketitems__oxpersparam",
"->",
"value",
")",
"{",
"$",
"this",
"->",
"_aPersParam",
"=",
"unserialize",
"(",
... | Basket item persistent parameters getter
@return array | [
"Basket",
"item",
"persistent",
"parameters",
"getter"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/UserBasketItem.php#L170-L177 | train |
OXID-eSales/oxideshop_ce | source/Application/Model/UserBasketItem.php | UserBasketItem.setPersParams | public function setPersParams($sPersParams)
{
$this->oxuserbasketitems__oxpersparam = new \OxidEsales\Eshop\Core\Field(serialize($sPersParams), \OxidEsales\Eshop\Core\Field::T_RAW);
} | php | public function setPersParams($sPersParams)
{
$this->oxuserbasketitems__oxpersparam = new \OxidEsales\Eshop\Core\Field(serialize($sPersParams), \OxidEsales\Eshop\Core\Field::T_RAW);
} | [
"public",
"function",
"setPersParams",
"(",
"$",
"sPersParams",
")",
"{",
"$",
"this",
"->",
"oxuserbasketitems__oxpersparam",
"=",
"new",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Field",
"(",
"serialize",
"(",
"$",
"sPersParams",
")",
",",
"\... | Basket item persistent parameters setter
@param string $sPersParams persistent parameters | [
"Basket",
"item",
"persistent",
"parameters",
"setter"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/UserBasketItem.php#L184-L187 | train |
OXID-eSales/oxideshop_ce | source/Core/UtilsString.php | UtilsString.prepareCSVField | public function prepareCSVField($sInField)
{
$oStr = getStr();
if ($oStr->strstr($sInField, '"')) {
return '"' . str_replace('"', '""', $sInField) . '"';
} elseif ($oStr->strstr($sInField, ';')) {
return '"' . $sInField . '"';
}
return $sInField;
} | php | public function prepareCSVField($sInField)
{
$oStr = getStr();
if ($oStr->strstr($sInField, '"')) {
return '"' . str_replace('"', '""', $sInField) . '"';
} elseif ($oStr->strstr($sInField, ';')) {
return '"' . $sInField . '"';
}
return $sInField;
} | [
"public",
"function",
"prepareCSVField",
"(",
"$",
"sInField",
")",
"{",
"$",
"oStr",
"=",
"getStr",
"(",
")",
";",
"if",
"(",
"$",
"oStr",
"->",
"strstr",
"(",
"$",
"sInField",
",",
"'\"'",
")",
")",
"{",
"return",
"'\"'",
".",
"str_replace",
"(",
... | Prepares passed string for CSV format
@param string $sInField String to prepare
@return string | [
"Prepares",
"passed",
"string",
"for",
"CSV",
"format"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/UtilsString.php#L28-L38 | train |
OXID-eSales/oxideshop_ce | source/Core/UtilsString.php | UtilsString.prepareStrForSearch | public function prepareStrForSearch($sSearchStr)
{
$oStr = getStr();
if ($oStr->hasSpecialChars($sSearchStr)) {
return $oStr->recodeEntities($sSearchStr, true, ['&'], ['&']);
}
return '';
} | php | public function prepareStrForSearch($sSearchStr)
{
$oStr = getStr();
if ($oStr->hasSpecialChars($sSearchStr)) {
return $oStr->recodeEntities($sSearchStr, true, ['&'], ['&']);
}
return '';
} | [
"public",
"function",
"prepareStrForSearch",
"(",
"$",
"sSearchStr",
")",
"{",
"$",
"oStr",
"=",
"getStr",
"(",
")",
";",
"if",
"(",
"$",
"oStr",
"->",
"hasSpecialChars",
"(",
"$",
"sSearchStr",
")",
")",
"{",
"return",
"$",
"oStr",
"->",
"recodeEntities... | Prepares and returns string for search engines.
@param string $sSearchStr String to prepare for search engines
@return string | [
"Prepares",
"and",
"returns",
"string",
"for",
"search",
"engines",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/UtilsString.php#L72-L80 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/CategoryMainAjax.php | CategoryMainAjax.addArticle | public function addArticle()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$aArticles = $this->_getActionIds('oxarticles.oxid');
$sCategoryID = $myConfig->getRequestParameter('synchoxid');
$sShopID = $myConfig->getShopId();
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->startTransaction();
try {
$database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sArticleTable = $this->_getViewName('oxarticles');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$aArticles = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
if (is_array($aArticles)) {
$sO2CView = $this->_getViewName('oxobject2category');
$oNew = oxNew(\OxidEsales\Eshop\Application\Model\Object2Category::class);
$sProdIds = "";
foreach ($aArticles as $sAdd) {
// check, if it's already in, then don't add it again
$sSelect = "select 1 from $sO2CView as oxobject2category where oxobject2category.oxcatnid= "
. $database->quote($sCategoryID) . " and oxobject2category.oxobjectid = " . $database->quote($sAdd) . "";
// We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
if ($database->getOne($sSelect, false, false)) {
continue;
}
$oNew->oxobject2category__oxid = new \OxidEsales\Eshop\Core\Field($oNew->setId(md5($sAdd . $sCategoryID . $sShopID)));
$oNew->oxobject2category__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
$oNew->oxobject2category__oxcatnid = new \OxidEsales\Eshop\Core\Field($sCategoryID);
$oNew->oxobject2category__oxtime = new \OxidEsales\Eshop\Core\Field(time());
$oNew->save();
if ($sProdIds) {
$sProdIds .= ",";
}
$sProdIds .= $database->quote($sAdd);
}
// updating oxtime values
$this->_updateOxTime($sProdIds);
$this->resetArtSeoUrl($aArticles);
$this->resetCounter("catArticle", $sCategoryID);
}
} catch (Exception $exception) {
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->rollbackTransaction();
throw $exception;
}
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->commitTransaction();
} | php | public function addArticle()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$aArticles = $this->_getActionIds('oxarticles.oxid');
$sCategoryID = $myConfig->getRequestParameter('synchoxid');
$sShopID = $myConfig->getShopId();
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->startTransaction();
try {
$database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$sArticleTable = $this->_getViewName('oxarticles');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$aArticles = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
if (is_array($aArticles)) {
$sO2CView = $this->_getViewName('oxobject2category');
$oNew = oxNew(\OxidEsales\Eshop\Application\Model\Object2Category::class);
$sProdIds = "";
foreach ($aArticles as $sAdd) {
// check, if it's already in, then don't add it again
$sSelect = "select 1 from $sO2CView as oxobject2category where oxobject2category.oxcatnid= "
. $database->quote($sCategoryID) . " and oxobject2category.oxobjectid = " . $database->quote($sAdd) . "";
// We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
if ($database->getOne($sSelect, false, false)) {
continue;
}
$oNew->oxobject2category__oxid = new \OxidEsales\Eshop\Core\Field($oNew->setId(md5($sAdd . $sCategoryID . $sShopID)));
$oNew->oxobject2category__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
$oNew->oxobject2category__oxcatnid = new \OxidEsales\Eshop\Core\Field($sCategoryID);
$oNew->oxobject2category__oxtime = new \OxidEsales\Eshop\Core\Field(time());
$oNew->save();
if ($sProdIds) {
$sProdIds .= ",";
}
$sProdIds .= $database->quote($sAdd);
}
// updating oxtime values
$this->_updateOxTime($sProdIds);
$this->resetArtSeoUrl($aArticles);
$this->resetCounter("catArticle", $sCategoryID);
}
} catch (Exception $exception) {
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->rollbackTransaction();
throw $exception;
}
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->commitTransaction();
} | [
"public",
"function",
"addArticle",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"aArticles",
"=",
"$",
"this",
"->",
"_getActionIds",
"(",
"'oxarticles.oxid'... | Adds article to category
Creates new list
@throws Exception | [
"Adds",
"article",
"to",
"category",
"Creates",
"new",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CategoryMainAjax.php#L115-L172 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/CategoryMainAjax.php | CategoryMainAjax._updateOxTime | protected function _updateOxTime($sProdIds)
{
if ($sProdIds) {
$sO2CView = $this->_getViewName('oxobject2category');
$sSqlShopFilter = $this->getUpdateOxTimeQueryShopFilter();
$sSqlWhereShopFilter = $this->getUpdateOxTimeSqlWhereFilter();
$sQ = "update oxobject2category set oxtime = 0 where oxid in (
select _tmp.oxid from (
select oxobject2category.oxid from (
select min(oxtime) as oxtime, oxobjectid from {$sO2CView}
where oxobjectid in ( {$sProdIds} ) {$sSqlShopFilter} group by oxobjectid
) as _subtmp
left join oxobject2category on oxobject2category.oxtime = _subtmp.oxtime
and oxobject2category.oxobjectid = _subtmp.oxobjectid
{$sSqlWhereShopFilter}
) as _tmp
) {$sSqlShopFilter}";
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->execute($sQ);
}
} | php | protected function _updateOxTime($sProdIds)
{
if ($sProdIds) {
$sO2CView = $this->_getViewName('oxobject2category');
$sSqlShopFilter = $this->getUpdateOxTimeQueryShopFilter();
$sSqlWhereShopFilter = $this->getUpdateOxTimeSqlWhereFilter();
$sQ = "update oxobject2category set oxtime = 0 where oxid in (
select _tmp.oxid from (
select oxobject2category.oxid from (
select min(oxtime) as oxtime, oxobjectid from {$sO2CView}
where oxobjectid in ( {$sProdIds} ) {$sSqlShopFilter} group by oxobjectid
) as _subtmp
left join oxobject2category on oxobject2category.oxtime = _subtmp.oxtime
and oxobject2category.oxobjectid = _subtmp.oxobjectid
{$sSqlWhereShopFilter}
) as _tmp
) {$sSqlShopFilter}";
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->execute($sQ);
}
} | [
"protected",
"function",
"_updateOxTime",
"(",
"$",
"sProdIds",
")",
"{",
"if",
"(",
"$",
"sProdIds",
")",
"{",
"$",
"sO2CView",
"=",
"$",
"this",
"->",
"_getViewName",
"(",
"'oxobject2category'",
")",
";",
"$",
"sSqlShopFilter",
"=",
"$",
"this",
"->",
... | Updates oxtime value for products
@param string $sProdIds product ids: "id1", "id2", "id3" | [
"Updates",
"oxtime",
"value",
"for",
"products"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CategoryMainAjax.php#L179-L199 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/CategoryMainAjax.php | CategoryMainAjax.removeArticle | public function removeArticle()
{
$aArticles = $this->_getActionIds('oxarticles.oxid');
$sCategoryID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sArticleTable = $this->_getViewName('oxarticles');
$aArticles = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
// adding
if (is_array($aArticles) && count($aArticles)) {
$this->removeCategoryArticles($aArticles, $sCategoryID);
}
$this->resetArtSeoUrl($aArticles, $sCategoryID);
$this->resetCounter("catArticle", $sCategoryID);
//notify services
$relation = oxNew(\OxidEsales\Eshop\Application\Model\Object2Category::class);
$relation->setCategoryId($sCategoryID);
$this->dispatchEvent(new AfterModelUpdateEvent($relation));
} | php | public function removeArticle()
{
$aArticles = $this->_getActionIds('oxarticles.oxid');
$sCategoryID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sArticleTable = $this->_getViewName('oxarticles');
$aArticles = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
// adding
if (is_array($aArticles) && count($aArticles)) {
$this->removeCategoryArticles($aArticles, $sCategoryID);
}
$this->resetArtSeoUrl($aArticles, $sCategoryID);
$this->resetCounter("catArticle", $sCategoryID);
//notify services
$relation = oxNew(\OxidEsales\Eshop\Application\Model\Object2Category::class);
$relation->setCategoryId($sCategoryID);
$this->dispatchEvent(new AfterModelUpdateEvent($relation));
} | [
"public",
"function",
"removeArticle",
"(",
")",
"{",
"$",
"aArticles",
"=",
"$",
"this",
"->",
"_getActionIds",
"(",
"'oxarticles.oxid'",
")",
";",
"$",
"sCategoryID",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig"... | Removes article from category | [
"Removes",
"article",
"from",
"category"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CategoryMainAjax.php#L223-L246 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/CategoryMainAjax.php | CategoryMainAjax.getRemoveCategoryArticlesQueryFilter | protected function getRemoveCategoryArticlesQueryFilter($categoryID, $prodIds)
{
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$where = "where oxcatnid=" . $db->quote($categoryID);
$whereProductIdIn = " oxobjectid in ( {$prodIds} )";
if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blVariantsSelection')) {
$whereProductIdIn = "( " . $whereProductIdIn . " OR oxobjectid in (
select oxid from oxarticles where oxparentid in ({$prodIds})
)
)";
}
$where = $where . ' AND ' . $whereProductIdIn;
return $where;
} | php | protected function getRemoveCategoryArticlesQueryFilter($categoryID, $prodIds)
{
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$where = "where oxcatnid=" . $db->quote($categoryID);
$whereProductIdIn = " oxobjectid in ( {$prodIds} )";
if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blVariantsSelection')) {
$whereProductIdIn = "( " . $whereProductIdIn . " OR oxobjectid in (
select oxid from oxarticles where oxparentid in ({$prodIds})
)
)";
}
$where = $where . ' AND ' . $whereProductIdIn;
return $where;
} | [
"protected",
"function",
"getRemoveCategoryArticlesQueryFilter",
"(",
"$",
"categoryID",
",",
"$",
"prodIds",
")",
"{",
"$",
"db",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"DatabaseProvider",
"::",
"getDb",
"(",
")",
";",
"$",
"where",
"="... | Form query filter to remove articles from category.
@param string $categoryID
@param string $prodIds
@return string | [
"Form",
"query",
"filter",
"to",
"remove",
"articles",
"from",
"category",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CategoryMainAjax.php#L278-L293 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController._unsetPaymentErrors | protected function _unsetPaymentErrors()
{
$iPayError = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('payerror');
$sPayErrorText = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('payerrortext');
if (!($iPayError || $sPayErrorText)) {
$iPayError = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('payerror');
$sPayErrorText = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('payerrortext');
}
if ($iPayError) {
\OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('payerror');
$this->_sPaymentError = $iPayError;
}
if ($sPayErrorText) {
\OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('payerrortext');
$this->_sPaymentErrorText = $sPayErrorText;
}
} | php | protected function _unsetPaymentErrors()
{
$iPayError = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('payerror');
$sPayErrorText = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('payerrortext');
if (!($iPayError || $sPayErrorText)) {
$iPayError = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('payerror');
$sPayErrorText = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('payerrortext');
}
if ($iPayError) {
\OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('payerror');
$this->_sPaymentError = $iPayError;
}
if ($sPayErrorText) {
\OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('payerrortext');
$this->_sPaymentErrorText = $sPayErrorText;
}
} | [
"protected",
"function",
"_unsetPaymentErrors",
"(",
")",
"{",
"$",
"iPayError",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getRequestParameter",
"(",
"'payerror'",
")",
";",
"$",
"sPayErrorText"... | Unsets payment errors from session | [
"Unsets",
"payment",
"errors",
"from",
"session"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L224-L242 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.changeshipping | public function changeshipping()
{
$oSession = $this->getSession();
$oBasket = $oSession->getBasket();
$oBasket->setShipping(null);
$oBasket->onUpdate();
$oSession->setVariable('sShipSet', \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet'));
} | php | public function changeshipping()
{
$oSession = $this->getSession();
$oBasket = $oSession->getBasket();
$oBasket->setShipping(null);
$oBasket->onUpdate();
$oSession->setVariable('sShipSet', \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet'));
} | [
"public",
"function",
"changeshipping",
"(",
")",
"{",
"$",
"oSession",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
";",
"$",
"oBasket",
"=",
"$",
"oSession",
"->",
"getBasket",
"(",
")",
";",
"$",
"oBasket",
"->",
"setShipping",
"(",
"null",
")",
... | Changes shipping set to chosen one. Sets basket status to not up-to-date, which later
forces to recalculate it | [
"Changes",
"shipping",
"set",
"to",
"chosen",
"one",
".",
"Sets",
"basket",
"status",
"to",
"not",
"up",
"-",
"to",
"-",
"date",
"which",
"later",
"forces",
"to",
"recalculate",
"it"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L248-L256 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.validatePayment | public function validatePayment()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$oSession = $this->getSession();
//#1308C - check user. Function is executed before render(), and oUser is not set!
// Set it manually for use in methods getPaymentList(), getShippingSetList()...
$oUser = $this->getUser();
if (!$oUser) {
$oSession->setVariable('payerror', 2);
return;
}
if (!($sShipSetId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet'))) {
$sShipSetId = $oSession->getVariable('sShipSet');
}
if (!($sPaymentId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('paymentid'))) {
$sPaymentId = $oSession->getVariable('paymentid');
}
if (!($aDynvalue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('dynvalue'))) {
$aDynvalue = $oSession->getVariable('dynvalue');
}
// A. additional protection
if (!$myConfig->getConfigParam('blOtherCountryOrder') && $sPaymentId == 'oxempty') {
$sPaymentId = '';
}
//#1308C - check if we have paymentID, and it really exists
if (!$sPaymentId) {
$oSession->setVariable('payerror', 1);
return;
}
if ($this->getDynDataFiltered() && $sPaymentId == 'oxidcreditcard') {
$oSession->setVariable('payerror', 7);
return;
}
$oBasket = $oSession->getBasket();
$oBasket->setPayment(null);
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
$oPayment->load($sPaymentId);
// getting basket price for payment calculation
$dBasketPrice = $oBasket->getPriceForPayment();
$blOK = $oPayment->isValidPayment($aDynvalue, $myConfig->getShopId(), $oUser, $dBasketPrice, $sShipSetId);
if ($blOK) {
$oSession->setVariable('paymentid', $sPaymentId);
$oSession->setVariable('dynvalue', $aDynvalue);
$oBasket->setShipping($sShipSetId);
$oSession->deleteVariable('_selected_paymentid');
return 'order';
} else {
$oSession->setVariable('payerror', $oPayment->getPaymentErrorNumber());
//#1308C - delete paymentid from session, and save selected it just for view
$oSession->deleteVariable('paymentid');
$oSession->setVariable('_selected_paymentid', $sPaymentId);
return;
}
} | php | public function validatePayment()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$oSession = $this->getSession();
//#1308C - check user. Function is executed before render(), and oUser is not set!
// Set it manually for use in methods getPaymentList(), getShippingSetList()...
$oUser = $this->getUser();
if (!$oUser) {
$oSession->setVariable('payerror', 2);
return;
}
if (!($sShipSetId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet'))) {
$sShipSetId = $oSession->getVariable('sShipSet');
}
if (!($sPaymentId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('paymentid'))) {
$sPaymentId = $oSession->getVariable('paymentid');
}
if (!($aDynvalue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('dynvalue'))) {
$aDynvalue = $oSession->getVariable('dynvalue');
}
// A. additional protection
if (!$myConfig->getConfigParam('blOtherCountryOrder') && $sPaymentId == 'oxempty') {
$sPaymentId = '';
}
//#1308C - check if we have paymentID, and it really exists
if (!$sPaymentId) {
$oSession->setVariable('payerror', 1);
return;
}
if ($this->getDynDataFiltered() && $sPaymentId == 'oxidcreditcard') {
$oSession->setVariable('payerror', 7);
return;
}
$oBasket = $oSession->getBasket();
$oBasket->setPayment(null);
$oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
$oPayment->load($sPaymentId);
// getting basket price for payment calculation
$dBasketPrice = $oBasket->getPriceForPayment();
$blOK = $oPayment->isValidPayment($aDynvalue, $myConfig->getShopId(), $oUser, $dBasketPrice, $sShipSetId);
if ($blOK) {
$oSession->setVariable('paymentid', $sPaymentId);
$oSession->setVariable('dynvalue', $aDynvalue);
$oBasket->setShipping($sShipSetId);
$oSession->deleteVariable('_selected_paymentid');
return 'order';
} else {
$oSession->setVariable('payerror', $oPayment->getPaymentErrorNumber());
//#1308C - delete paymentid from session, and save selected it just for view
$oSession->deleteVariable('paymentid');
$oSession->setVariable('_selected_paymentid', $sPaymentId);
return;
}
} | [
"public",
"function",
"validatePayment",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"oSession",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
";",
"//... | Validates oxidcreditcard and oxiddebitnote user payment data.
Returns null if problems on validating occured. If everything
is OK - returns "order" and redirects to payment confirmation
page.
Session variables:
<b>paymentid</b>, <b>dynvalue</b>, <b>payerror</b>
@return mixed | [
"Validates",
"oxidcreditcard",
"and",
"oxiddebitnote",
"user",
"payment",
"data",
".",
"Returns",
"null",
"if",
"problems",
"on",
"validating",
"occured",
".",
"If",
"everything",
"is",
"OK",
"-",
"returns",
"order",
"and",
"redirects",
"to",
"payment",
"confirm... | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L269-L337 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getPaymentList | public function getPaymentList()
{
if ($this->_oPaymentList === null) {
$this->_oPaymentList = false;
$sActShipSet = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet');
if (!$sActShipSet) {
$sActShipSet = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet');
}
$oBasket = $this->getSession()->getBasket();
// load sets, active set, and active set payment list
list($aAllSets, $sActShipSet, $aPaymentList) =
\OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)->getDeliverySetData($sActShipSet, $this->getUser(), $oBasket);
$oBasket->setShipping($sActShipSet);
// calculating payment expences for preview for each payment
$this->_setValues($aPaymentList, $oBasket);
$this->_oPaymentList = $aPaymentList;
$this->_aAllSets = $aAllSets;
}
return $this->_oPaymentList;
} | php | public function getPaymentList()
{
if ($this->_oPaymentList === null) {
$this->_oPaymentList = false;
$sActShipSet = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet');
if (!$sActShipSet) {
$sActShipSet = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet');
}
$oBasket = $this->getSession()->getBasket();
// load sets, active set, and active set payment list
list($aAllSets, $sActShipSet, $aPaymentList) =
\OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)->getDeliverySetData($sActShipSet, $this->getUser(), $oBasket);
$oBasket->setShipping($sActShipSet);
// calculating payment expences for preview for each payment
$this->_setValues($aPaymentList, $oBasket);
$this->_oPaymentList = $aPaymentList;
$this->_aAllSets = $aAllSets;
}
return $this->_oPaymentList;
} | [
"public",
"function",
"getPaymentList",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_oPaymentList",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_oPaymentList",
"=",
"false",
";",
"$",
"sActShipSet",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core"... | Template variable getter. Returns paymentlist
@return object | [
"Template",
"variable",
"getter",
".",
"Returns",
"paymentlist"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L344-L369 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getAllSets | public function getAllSets()
{
if ($this->_aAllSets === null) {
$this->_aAllSets = false;
if ($this->getPaymentList()) {
return $this->_aAllSets;
}
}
return $this->_aAllSets;
} | php | public function getAllSets()
{
if ($this->_aAllSets === null) {
$this->_aAllSets = false;
if ($this->getPaymentList()) {
return $this->_aAllSets;
}
}
return $this->_aAllSets;
} | [
"public",
"function",
"getAllSets",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aAllSets",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_aAllSets",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"getPaymentList",
"(",
")",
")",
"{",
"return",
... | Template variable getter. Returns all delivery sets
@return array | [
"Template",
"variable",
"getter",
".",
"Returns",
"all",
"delivery",
"sets"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L376-L387 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getAllSetsCnt | public function getAllSetsCnt()
{
if ($this->_iAllSetsCnt === null) {
$this->_iAllSetsCnt = 0;
if ($this->getPaymentList()) {
$this->_iAllSetsCnt = count($this->_aAllSets);
}
}
return $this->_iAllSetsCnt;
} | php | public function getAllSetsCnt()
{
if ($this->_iAllSetsCnt === null) {
$this->_iAllSetsCnt = 0;
if ($this->getPaymentList()) {
$this->_iAllSetsCnt = count($this->_aAllSets);
}
}
return $this->_iAllSetsCnt;
} | [
"public",
"function",
"getAllSetsCnt",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_iAllSetsCnt",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_iAllSetsCnt",
"=",
"0",
";",
"if",
"(",
"$",
"this",
"->",
"getPaymentList",
"(",
")",
")",
"{",
"$",
... | Template variable getter. Returns number of delivery sets
@return integer | [
"Template",
"variable",
"getter",
".",
"Returns",
"number",
"of",
"delivery",
"sets"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L394-L405 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController._setValues | protected function _setValues(& $aPaymentList, $oBasket = null)
{
if (is_array($aPaymentList)) {
foreach ($aPaymentList as $oPayment) {
$oPayment->calculate($oBasket);
$oPayment->aDynValues = $oPayment->getDynValues();
if ($oPayment->oxpayments__oxchecked->value) {
$this->_sCheckedId = $oPayment->getId();
}
}
}
} | php | protected function _setValues(& $aPaymentList, $oBasket = null)
{
if (is_array($aPaymentList)) {
foreach ($aPaymentList as $oPayment) {
$oPayment->calculate($oBasket);
$oPayment->aDynValues = $oPayment->getDynValues();
if ($oPayment->oxpayments__oxchecked->value) {
$this->_sCheckedId = $oPayment->getId();
}
}
}
} | [
"protected",
"function",
"_setValues",
"(",
"&",
"$",
"aPaymentList",
",",
"$",
"oBasket",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"aPaymentList",
")",
")",
"{",
"foreach",
"(",
"$",
"aPaymentList",
"as",
"$",
"oPayment",
")",
"{",
"$",... | Calculate payment cost for each payment. Sould be removed later
@param array $aPaymentList payments array
@param \OxidEsales\Eshop\Application\Model\Basket $oBasket basket object | [
"Calculate",
"payment",
"cost",
"for",
"each",
"payment",
".",
"Sould",
"be",
"removed",
"later"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L413-L424 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getDynValue | public function getDynValue()
{
if ($this->_aDynValue === null) {
$this->_aDynValue = false;
// flyspray#1217 (sarunas)
if (($aDynValue = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('dynvalue'))) {
$this->_aDynValue = $aDynValue;
} else {
$this->_aDynValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("dynvalue");
}
// #701A
// assign debit note payment params to view data
$aPaymentList = $this->getPaymentList();
if (isset($aPaymentList['oxiddebitnote'])) {
$this->_assignDebitNoteParams();
}
}
return $this->_aDynValue;
} | php | public function getDynValue()
{
if ($this->_aDynValue === null) {
$this->_aDynValue = false;
// flyspray#1217 (sarunas)
if (($aDynValue = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('dynvalue'))) {
$this->_aDynValue = $aDynValue;
} else {
$this->_aDynValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("dynvalue");
}
// #701A
// assign debit note payment params to view data
$aPaymentList = $this->getPaymentList();
if (isset($aPaymentList['oxiddebitnote'])) {
$this->_assignDebitNoteParams();
}
}
return $this->_aDynValue;
} | [
"public",
"function",
"getDynValue",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aDynValue",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_aDynValue",
"=",
"false",
";",
"// flyspray#1217 (sarunas)",
"if",
"(",
"(",
"$",
"aDynValue",
"=",
"\\",
"OxidE... | Template variable getter. Returns dyn values
@return array | [
"Template",
"variable",
"getter",
".",
"Returns",
"dyn",
"values"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L481-L502 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getCheckedPaymentId | public function getCheckedPaymentId()
{
if ($this->_sCheckedPaymentId === null) {
if (!($sPaymentID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('paymentid'))) {
$sPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('paymentid');
}
if ($sPaymentID) {
$sCheckedId = $sPaymentID;
} elseif (($sSelectedPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('_selected_paymentid'))) {
$sCheckedId = $sSelectedPaymentID;
} else {
// #1010A.
if ($oUser = $this->getUser()) {
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
if (($sLastPaymentId = $oOrder->getLastUserPaymentType($oUser->getId()))) {
$sCheckedId = $sLastPaymentId;
}
}
}
// #M253 set to selected payment in db
if (!$sCheckedId && $this->_sCheckedId) {
$sCheckedId = $this->_sCheckedId;
}
// #646
$oPaymentList = $this->getPaymentList();
if (isset($oPaymentList) && $oPaymentList && !isset($oPaymentList[$sCheckedId])) {
end($oPaymentList);
$sCheckedId = key($oPaymentList);
}
$this->_sCheckedPaymentId = $sCheckedId;
}
return $this->_sCheckedPaymentId;
} | php | public function getCheckedPaymentId()
{
if ($this->_sCheckedPaymentId === null) {
if (!($sPaymentID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('paymentid'))) {
$sPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('paymentid');
}
if ($sPaymentID) {
$sCheckedId = $sPaymentID;
} elseif (($sSelectedPaymentID = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('_selected_paymentid'))) {
$sCheckedId = $sSelectedPaymentID;
} else {
// #1010A.
if ($oUser = $this->getUser()) {
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
if (($sLastPaymentId = $oOrder->getLastUserPaymentType($oUser->getId()))) {
$sCheckedId = $sLastPaymentId;
}
}
}
// #M253 set to selected payment in db
if (!$sCheckedId && $this->_sCheckedId) {
$sCheckedId = $this->_sCheckedId;
}
// #646
$oPaymentList = $this->getPaymentList();
if (isset($oPaymentList) && $oPaymentList && !isset($oPaymentList[$sCheckedId])) {
end($oPaymentList);
$sCheckedId = key($oPaymentList);
}
$this->_sCheckedPaymentId = $sCheckedId;
}
return $this->_sCheckedPaymentId;
} | [
"public",
"function",
"getCheckedPaymentId",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_sCheckedPaymentId",
"===",
"null",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"sPaymentID",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",... | Get checked payment ID. Tries to get checked payment ID from session,
if fails, then tries to get payment ID from last order.
@return string | [
"Get",
"checked",
"payment",
"ID",
".",
"Tries",
"to",
"get",
"checked",
"payment",
"ID",
"from",
"session",
"if",
"fails",
"then",
"tries",
"to",
"get",
"payment",
"ID",
"from",
"last",
"order",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L534-L569 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getPaymentCnt | public function getPaymentCnt()
{
if ($this->_iPaymentCnt === null) {
$this->_iPaymentCnt = false;
if ($oPaymentList = $this->getPaymentList()) {
$this->_iPaymentCnt = count($oPaymentList);
}
}
return $this->_iPaymentCnt;
} | php | public function getPaymentCnt()
{
if ($this->_iPaymentCnt === null) {
$this->_iPaymentCnt = false;
if ($oPaymentList = $this->getPaymentList()) {
$this->_iPaymentCnt = count($oPaymentList);
}
}
return $this->_iPaymentCnt;
} | [
"public",
"function",
"getPaymentCnt",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_iPaymentCnt",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_iPaymentCnt",
"=",
"false",
";",
"if",
"(",
"$",
"oPaymentList",
"=",
"$",
"this",
"->",
"getPaymentList",
... | Template variable getter. Returns payment list count
@return integer | [
"Template",
"variable",
"getter",
".",
"Returns",
"payment",
"list",
"count"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L576-L587 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController.getCreditYears | public function getCreditYears()
{
if ($this->_aCreditYears === null) {
$this->_aCreditYears = false;
$this->_aCreditYears = range(date('Y'), date('Y') + 10);
}
return $this->_aCreditYears;
} | php | public function getCreditYears()
{
if ($this->_aCreditYears === null) {
$this->_aCreditYears = false;
$this->_aCreditYears = range(date('Y'), date('Y') + 10);
}
return $this->_aCreditYears;
} | [
"public",
"function",
"getCreditYears",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_aCreditYears",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_aCreditYears",
"=",
"false",
";",
"$",
"this",
"->",
"_aCreditYears",
"=",
"range",
"(",
"date",
"(",
"'... | Template variable getter. Returns array of years for credit cards
@return array | [
"Template",
"variable",
"getter",
".",
"Returns",
"array",
"of",
"years",
"for",
"credit",
"cards"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L594-L603 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController._checkArrValuesEmpty | protected function _checkArrValuesEmpty($aData, $aKeys)
{
if (!is_array($aKeys) || count($aKeys) < 1) {
return false;
}
foreach ($aKeys as $sKey) {
if (isset($aData[$sKey]) && !empty($aData[$sKey])) {
return false;
}
}
return true;
} | php | protected function _checkArrValuesEmpty($aData, $aKeys)
{
if (!is_array($aKeys) || count($aKeys) < 1) {
return false;
}
foreach ($aKeys as $sKey) {
if (isset($aData[$sKey]) && !empty($aData[$sKey])) {
return false;
}
}
return true;
} | [
"protected",
"function",
"_checkArrValuesEmpty",
"(",
"$",
"aData",
",",
"$",
"aKeys",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"aKeys",
")",
"||",
"count",
"(",
"$",
"aKeys",
")",
"<",
"1",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
... | Function to check if array values are empty againts given array keys
@param array $aData array of data to check
@param array $aKeys array of array indexes
@return bool | [
"Function",
"to",
"check",
"if",
"array",
"values",
"are",
"empty",
"againts",
"given",
"array",
"keys"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L613-L626 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/PaymentController.php | PaymentController._filterDynData | protected function _filterDynData()
{
//in case we actually ARE allowed to store the data
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("blStoreCreditCardInfo")) {
//then do nothing and reset _blDynDataFiltered
$this->_blDynDataFiltered = false;
return;
}
$aDynData = $this->getSession()->getVariable("dynvalue");
$aFields = ["kktype", "kknumber", "kkname", "kkmonth", "kkyear", "kkpruef"];
if ($aDynData) {
if (!$this->_checkArrValuesEmpty($aDynData, $aFields)) {
$this->_blDynDataFiltered = true;
}
$aDynData["kktype"] = null;
$aDynData["kknumber"] = null;
$aDynData["kkname"] = null;
$aDynData["kkmonth"] = null;
$aDynData["kkyear"] = null;
$aDynData["kkpruef"] = null;
\OxidEsales\Eshop\Core\Registry::getSession()->setVariable("dynvalue", $aDynData);
}
if (!$this->_checkArrValuesEmpty($_REQUEST["dynvalue"], $aFields) ||
!$this->_checkArrValuesEmpty($_POST["dynvalue"], $aFields) ||
!$this->_checkArrValuesEmpty($_GET["dynvalue"], $aFields)
) {
$this->_blDynDataFiltered = true;
}
unset($_REQUEST["dynvalue"]["kktype"]);
unset($_REQUEST["dynvalue"]["kknumber"]);
unset($_REQUEST["dynvalue"]["kkname"]);
unset($_REQUEST["dynvalue"]["kkmonth"]);
unset($_REQUEST["dynvalue"]["kkyear"]);
unset($_REQUEST["dynvalue"]["kkpruef"]);
unset($_POST["dynvalue"]["kktype"]);
unset($_POST["dynvalue"]["kknumber"]);
unset($_POST["dynvalue"]["kkname"]);
unset($_POST["dynvalue"]["kkmonth"]);
unset($_POST["dynvalue"]["kkyear"]);
unset($_POST["dynvalue"]["kkpruef"]);
unset($_GET["dynvalue"]["kktype"]);
unset($_GET["dynvalue"]["kknumber"]);
unset($_GET["dynvalue"]["kkname"]);
unset($_GET["dynvalue"]["kkmonth"]);
unset($_GET["dynvalue"]["kkyear"]);
unset($_GET["dynvalue"]["kkpruef"]);
} | php | protected function _filterDynData()
{
//in case we actually ARE allowed to store the data
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("blStoreCreditCardInfo")) {
//then do nothing and reset _blDynDataFiltered
$this->_blDynDataFiltered = false;
return;
}
$aDynData = $this->getSession()->getVariable("dynvalue");
$aFields = ["kktype", "kknumber", "kkname", "kkmonth", "kkyear", "kkpruef"];
if ($aDynData) {
if (!$this->_checkArrValuesEmpty($aDynData, $aFields)) {
$this->_blDynDataFiltered = true;
}
$aDynData["kktype"] = null;
$aDynData["kknumber"] = null;
$aDynData["kkname"] = null;
$aDynData["kkmonth"] = null;
$aDynData["kkyear"] = null;
$aDynData["kkpruef"] = null;
\OxidEsales\Eshop\Core\Registry::getSession()->setVariable("dynvalue", $aDynData);
}
if (!$this->_checkArrValuesEmpty($_REQUEST["dynvalue"], $aFields) ||
!$this->_checkArrValuesEmpty($_POST["dynvalue"], $aFields) ||
!$this->_checkArrValuesEmpty($_GET["dynvalue"], $aFields)
) {
$this->_blDynDataFiltered = true;
}
unset($_REQUEST["dynvalue"]["kktype"]);
unset($_REQUEST["dynvalue"]["kknumber"]);
unset($_REQUEST["dynvalue"]["kkname"]);
unset($_REQUEST["dynvalue"]["kkmonth"]);
unset($_REQUEST["dynvalue"]["kkyear"]);
unset($_REQUEST["dynvalue"]["kkpruef"]);
unset($_POST["dynvalue"]["kktype"]);
unset($_POST["dynvalue"]["kknumber"]);
unset($_POST["dynvalue"]["kkname"]);
unset($_POST["dynvalue"]["kkmonth"]);
unset($_POST["dynvalue"]["kkyear"]);
unset($_POST["dynvalue"]["kkpruef"]);
unset($_GET["dynvalue"]["kktype"]);
unset($_GET["dynvalue"]["kknumber"]);
unset($_GET["dynvalue"]["kkname"]);
unset($_GET["dynvalue"]["kkmonth"]);
unset($_GET["dynvalue"]["kkyear"]);
unset($_GET["dynvalue"]["kkpruef"]);
} | [
"protected",
"function",
"_filterDynData",
"(",
")",
"{",
"//in case we actually ARE allowed to store the data",
"if",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"\"blStoreCreditCar... | Due to legal reasons probably you are not allowed to store or even handle credit card data.
In this case we just delete and forget all submited credit card data from this point.
Override this method if you actually want to process credit card data.
Note: You should override this method as setting blStoreCreditCardInfo to true would
force storing CC data on shop side (what most often is illegal).
@return null | [
"Due",
"to",
"legal",
"reasons",
"probably",
"you",
"are",
"not",
"allowed",
"to",
"store",
"or",
"even",
"handle",
"credit",
"card",
"data",
".",
"In",
"this",
"case",
"we",
"just",
"delete",
"and",
"forget",
"all",
"submited",
"credit",
"card",
"data",
... | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/PaymentController.php#L639-L693 | train |
OXID-eSales/oxideshop_ce | source/Core/FileSystem/FileSystem.php | FileSystem.combinePaths | public function combinePaths()
{
$pathElements = func_get_args();
foreach ($pathElements as $key => $pathElement) {
$pathElements[$key] = rtrim($pathElement, DIRECTORY_SEPARATOR);
}
return implode(DIRECTORY_SEPARATOR, $pathElements);
} | php | public function combinePaths()
{
$pathElements = func_get_args();
foreach ($pathElements as $key => $pathElement) {
$pathElements[$key] = rtrim($pathElement, DIRECTORY_SEPARATOR);
}
return implode(DIRECTORY_SEPARATOR, $pathElements);
} | [
"public",
"function",
"combinePaths",
"(",
")",
"{",
"$",
"pathElements",
"=",
"func_get_args",
"(",
")",
";",
"foreach",
"(",
"$",
"pathElements",
"as",
"$",
"key",
"=>",
"$",
"pathElement",
")",
"{",
"$",
"pathElements",
"[",
"$",
"key",
"]",
"=",
"r... | Connect all parameters with backslash to single path.
Ensure that no double backslash appears if parameter already ends with backslash.
@return string | [
"Connect",
"all",
"parameters",
"with",
"backslash",
"to",
"single",
"path",
".",
"Ensure",
"that",
"no",
"double",
"backslash",
"appears",
"if",
"parameter",
"already",
"ends",
"with",
"backslash",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/FileSystem/FileSystem.php#L23-L31 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/AttributeMainAjax.php | AttributeMainAjax.removeAttrArticle | public function removeAttrArticle()
{
$aChosenCat = $this->_getActionIds('oxobject2attribute.oxid');
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sO2AttributeView = $this->_getViewName('oxobject2attribute');
$sQ = parent::_addFilter("delete $sO2AttributeView.* " . $this->_getQuery());
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
} elseif (is_array($aChosenCat)) {
$sChosenCategories = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aChosenCat));
$sQ = "delete from oxobject2attribute where oxobject2attribute.oxid in (" . $sChosenCategories . ") ";
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
}
} | php | public function removeAttrArticle()
{
$aChosenCat = $this->_getActionIds('oxobject2attribute.oxid');
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sO2AttributeView = $this->_getViewName('oxobject2attribute');
$sQ = parent::_addFilter("delete $sO2AttributeView.* " . $this->_getQuery());
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
} elseif (is_array($aChosenCat)) {
$sChosenCategories = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aChosenCat));
$sQ = "delete from oxobject2attribute where oxobject2attribute.oxid in (" . $sChosenCategories . ") ";
\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->Execute($sQ);
}
} | [
"public",
"function",
"removeAttrArticle",
"(",
")",
"{",
"$",
"aChosenCat",
"=",
"$",
"this",
"->",
"_getActionIds",
"(",
"'oxobject2attribute.oxid'",
")",
";",
"if",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
... | Removes article from Attribute list | [
"Removes",
"article",
"from",
"Attribute",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/AttributeMainAjax.php#L123-L137 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/AttributeMainAjax.php | AttributeMainAjax.addAttrArticle | public function addAttrArticle()
{
$aAddArticle = $this->_getActionIds('oxarticles.oxid');
$soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sArticleTable = $this->_getViewName('oxarticles');
$aAddArticle = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
$oAttribute = oxNew(\OxidEsales\Eshop\Application\Model\Attribute::class);
if ($oAttribute->load($soxId) && is_array($aAddArticle)) {
foreach ($aAddArticle as $sAdd) {
$oNewGroup = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
$oNewGroup->init("oxobject2attribute");
$oNewGroup->oxobject2attribute__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
$oNewGroup->oxobject2attribute__oxattrid = new \OxidEsales\Eshop\Core\Field($oAttribute->oxattribute__oxid->value);
$oNewGroup->save();
$this->onArticleAddToAttributeList($sAdd);
}
}
} | php | public function addAttrArticle()
{
$aAddArticle = $this->_getActionIds('oxarticles.oxid');
$soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');
// adding
if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
$sArticleTable = $this->_getViewName('oxarticles');
$aAddArticle = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
}
$oAttribute = oxNew(\OxidEsales\Eshop\Application\Model\Attribute::class);
if ($oAttribute->load($soxId) && is_array($aAddArticle)) {
foreach ($aAddArticle as $sAdd) {
$oNewGroup = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
$oNewGroup->init("oxobject2attribute");
$oNewGroup->oxobject2attribute__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
$oNewGroup->oxobject2attribute__oxattrid = new \OxidEsales\Eshop\Core\Field($oAttribute->oxattribute__oxid->value);
$oNewGroup->save();
$this->onArticleAddToAttributeList($sAdd);
}
}
} | [
"public",
"function",
"addAttrArticle",
"(",
")",
"{",
"$",
"aAddArticle",
"=",
"$",
"this",
"->",
"_getActionIds",
"(",
"'oxarticles.oxid'",
")",
";",
"$",
"soxId",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
... | Adds article to Attribute list | [
"Adds",
"article",
"to",
"Attribute",
"list"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/AttributeMainAjax.php#L142-L166 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/ExceptionErrorController.php | ExceptionErrorController.displayExceptionError | public function displayExceptionError()
{
$aViewData = $this->getViewData();
//add all exceptions to display
$aErrors = $this->_getErrors();
if (is_array($aErrors) && count($aErrors)) {
\OxidEsales\Eshop\Core\Registry::getUtilsView()->passAllErrorsToView($aViewData, $aErrors);
}
$oSmarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();
$oSmarty->assign("Errors", $aViewData["Errors"]);
// resetting errors from session
\OxidEsales\Eshop\Core\Registry::getSession()->setVariable('Errors', []);
} | php | public function displayExceptionError()
{
$aViewData = $this->getViewData();
//add all exceptions to display
$aErrors = $this->_getErrors();
if (is_array($aErrors) && count($aErrors)) {
\OxidEsales\Eshop\Core\Registry::getUtilsView()->passAllErrorsToView($aViewData, $aErrors);
}
$oSmarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();
$oSmarty->assign("Errors", $aViewData["Errors"]);
// resetting errors from session
\OxidEsales\Eshop\Core\Registry::getSession()->setVariable('Errors', []);
} | [
"public",
"function",
"displayExceptionError",
"(",
")",
"{",
"$",
"aViewData",
"=",
"$",
"this",
"->",
"getViewData",
"(",
")",
";",
"//add all exceptions to display",
"$",
"aErrors",
"=",
"$",
"this",
"->",
"_getErrors",
"(",
")",
";",
"if",
"(",
"is_array... | Sets exception errros to template | [
"Sets",
"exception",
"errros",
"to",
"template"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ExceptionErrorController.php#L29-L45 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/ExceptionErrorController.php | ExceptionErrorController._getErrors | protected function _getErrors()
{
$aErrors = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('Errors');
if (null === $aErrors) {
$aErrors = [];
}
return $aErrors;
} | php | protected function _getErrors()
{
$aErrors = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('Errors');
if (null === $aErrors) {
$aErrors = [];
}
return $aErrors;
} | [
"protected",
"function",
"_getErrors",
"(",
")",
"{",
"$",
"aErrors",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getSession",
"(",
")",
"->",
"getVariable",
"(",
"'Errors'",
")",
";",
"if",
"(",
"null",
"===",
"$",
"... | return page errors array
@return array | [
"return",
"page",
"errors",
"array"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ExceptionErrorController.php#L52-L61 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.render | public function render()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sPwrSearchFld = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("pwrsearchfld");
$sPwrSearchFld = $sPwrSearchFld ? strtolower($sPwrSearchFld) : "oxtitle";
$oArticle = null;
$oList = $this->getItemList();
if ($oList) {
foreach ($oList as $key => $oArticle) {
$sFieldName = "oxarticles__{$sPwrSearchFld}";
// formatting view
if (!$myConfig->getConfigParam('blSkipFormatConversion')) {
if ($oArticle->$sFieldName->fldtype == "datetime") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBDateTime($oArticle->$sFieldName);
} elseif ($oArticle->$sFieldName->fldtype == "timestamp") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBTimestamp($oArticle->$sFieldName);
} elseif ($oArticle->$sFieldName->fldtype == "date") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBDate($oArticle->$sFieldName);
}
}
$oArticle->pwrsearchval = $oArticle->$sFieldName->value;
$oList[$key] = $oArticle;
}
}
parent::render();
// load fields
if (!$oArticle && $oList) {
$oArticle = $oList->getBaseObject();
}
$this->_aViewData["pwrsearchfields"] = $oArticle ? $this->getSearchFields() : null;
$this->_aViewData["pwrsearchfld"] = strtoupper($sPwrSearchFld);
$aFilter = $this->getListFilter();
if (isset($aFilter["oxarticles"][$sPwrSearchFld])) {
$this->_aViewData["pwrsearchinput"] = $aFilter["oxarticles"][$sPwrSearchFld];
}
$sType = '';
$sValue = '';
$sArtCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("art_category");
if ($sArtCat && strstr($sArtCat, "@@") !== false) {
list($sType, $sValue) = explode("@@", $sArtCat);
}
$this->_aViewData["art_category"] = $sArtCat;
// parent categorie tree
$this->_aViewData["cattree"] = $this->getCategoryList($sType, $sValue);
// manufacturer list
$this->_aViewData["mnftree"] = $this->getManufacturerlist($sType, $sValue);
// vendor list
$this->_aViewData["vndtree"] = $this->getVendorList($sType, $sValue);
return "article_list.tpl";
} | php | public function render()
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sPwrSearchFld = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("pwrsearchfld");
$sPwrSearchFld = $sPwrSearchFld ? strtolower($sPwrSearchFld) : "oxtitle";
$oArticle = null;
$oList = $this->getItemList();
if ($oList) {
foreach ($oList as $key => $oArticle) {
$sFieldName = "oxarticles__{$sPwrSearchFld}";
// formatting view
if (!$myConfig->getConfigParam('blSkipFormatConversion')) {
if ($oArticle->$sFieldName->fldtype == "datetime") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBDateTime($oArticle->$sFieldName);
} elseif ($oArticle->$sFieldName->fldtype == "timestamp") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBTimestamp($oArticle->$sFieldName);
} elseif ($oArticle->$sFieldName->fldtype == "date") {
\OxidEsales\Eshop\Core\Registry::getUtilsDate()->convertDBDate($oArticle->$sFieldName);
}
}
$oArticle->pwrsearchval = $oArticle->$sFieldName->value;
$oList[$key] = $oArticle;
}
}
parent::render();
// load fields
if (!$oArticle && $oList) {
$oArticle = $oList->getBaseObject();
}
$this->_aViewData["pwrsearchfields"] = $oArticle ? $this->getSearchFields() : null;
$this->_aViewData["pwrsearchfld"] = strtoupper($sPwrSearchFld);
$aFilter = $this->getListFilter();
if (isset($aFilter["oxarticles"][$sPwrSearchFld])) {
$this->_aViewData["pwrsearchinput"] = $aFilter["oxarticles"][$sPwrSearchFld];
}
$sType = '';
$sValue = '';
$sArtCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("art_category");
if ($sArtCat && strstr($sArtCat, "@@") !== false) {
list($sType, $sValue) = explode("@@", $sArtCat);
}
$this->_aViewData["art_category"] = $sArtCat;
// parent categorie tree
$this->_aViewData["cattree"] = $this->getCategoryList($sType, $sValue);
// manufacturer list
$this->_aViewData["mnftree"] = $this->getManufacturerlist($sType, $sValue);
// vendor list
$this->_aViewData["vndtree"] = $this->getVendorList($sType, $sValue);
return "article_list.tpl";
} | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"sPwrSearchFld",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
... | Collects articles base data and passes them according to filtering rules,
returns name of template file "article_list.tpl".
@return string | [
"Collects",
"articles",
"base",
"data",
"and",
"passes",
"them",
"according",
"to",
"filtering",
"rules",
"returns",
"name",
"of",
"template",
"file",
"article_list",
".",
"tpl",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L40-L101 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.getSearchFields | public function getSearchFields()
{
$aSkipFields = ["oxblfixedprice", "oxvarselect", "oxamitemid",
"oxamtaskid", "oxpixiexport", "oxpixiexported"];
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
return array_diff($oArticle->getFieldNames(), $aSkipFields);
} | php | public function getSearchFields()
{
$aSkipFields = ["oxblfixedprice", "oxvarselect", "oxamitemid",
"oxamtaskid", "oxpixiexport", "oxpixiexported"];
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
return array_diff($oArticle->getFieldNames(), $aSkipFields);
} | [
"public",
"function",
"getSearchFields",
"(",
")",
"{",
"$",
"aSkipFields",
"=",
"[",
"\"oxblfixedprice\"",
",",
"\"oxvarselect\"",
",",
"\"oxamitemid\"",
",",
"\"oxamtaskid\"",
",",
"\"oxpixiexport\"",
",",
"\"oxpixiexported\"",
"]",
";",
"$",
"oArticle",
"=",
"o... | Returns array of fields which may be used for product data search
@return array | [
"Returns",
"array",
"of",
"fields",
"which",
"may",
"be",
"used",
"for",
"product",
"data",
"search"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L108-L115 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.getCategoryList | public function getCategoryList($sType, $sValue)
{
/** @var \OxidEsales\Eshop\Application\Model\CategoryList $oCatTree parent category tree */
$oCatTree = oxNew(\OxidEsales\Eshop\Application\Model\CategoryList::class);
$oCatTree->loadList();
if ($sType === 'cat') {
foreach ($oCatTree as $oCategory) {
if ($oCategory->oxcategories__oxid->value == $sValue) {
$oCategory->selected = 1;
break;
}
}
}
return $oCatTree;
} | php | public function getCategoryList($sType, $sValue)
{
/** @var \OxidEsales\Eshop\Application\Model\CategoryList $oCatTree parent category tree */
$oCatTree = oxNew(\OxidEsales\Eshop\Application\Model\CategoryList::class);
$oCatTree->loadList();
if ($sType === 'cat') {
foreach ($oCatTree as $oCategory) {
if ($oCategory->oxcategories__oxid->value == $sValue) {
$oCategory->selected = 1;
break;
}
}
}
return $oCatTree;
} | [
"public",
"function",
"getCategoryList",
"(",
"$",
"sType",
",",
"$",
"sValue",
")",
"{",
"/** @var \\OxidEsales\\Eshop\\Application\\Model\\CategoryList $oCatTree parent category tree */",
"$",
"oCatTree",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Appl... | Load category list, mark active category;
@param string $sType active list type
@param string $sValue active list item id
@return \OxidEsales\Eshop\Application\Model\CategoryList | [
"Load",
"category",
"list",
"mark",
"active",
"category",
";"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L125-L140 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.getManufacturerList | public function getManufacturerList($sType, $sValue)
{
$oMnfTree = oxNew(\OxidEsales\Eshop\Application\Model\ManufacturerList::class);
$oMnfTree->loadManufacturerList();
if ($sType === 'mnf') {
foreach ($oMnfTree as $oManufacturer) {
if ($oManufacturer->oxmanufacturers__oxid->value == $sValue) {
$oManufacturer->selected = 1;
break;
}
}
}
return $oMnfTree;
} | php | public function getManufacturerList($sType, $sValue)
{
$oMnfTree = oxNew(\OxidEsales\Eshop\Application\Model\ManufacturerList::class);
$oMnfTree->loadManufacturerList();
if ($sType === 'mnf') {
foreach ($oMnfTree as $oManufacturer) {
if ($oManufacturer->oxmanufacturers__oxid->value == $sValue) {
$oManufacturer->selected = 1;
break;
}
}
}
return $oMnfTree;
} | [
"public",
"function",
"getManufacturerList",
"(",
"$",
"sType",
",",
"$",
"sValue",
")",
"{",
"$",
"oMnfTree",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"ManufacturerList",
"::",
"class",
")",
";",
"$",... | Load manufacturer list, mark active category;
@param string $sType active list type
@param string $sValue active list item id
@return oxManufacturerList | [
"Load",
"manufacturer",
"list",
"mark",
"active",
"category",
";"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L150-L164 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.getVendorList | public function getVendorList($sType, $sValue)
{
$oVndTree = oxNew(\OxidEsales\Eshop\Application\Model\VendorList::class);
$oVndTree->loadVendorList();
if ($sType === 'vnd') {
foreach ($oVndTree as $oVendor) {
if ($oVendor->oxvendor__oxid->value == $sValue) {
$oVendor->selected = 1;
break;
}
}
}
return $oVndTree;
} | php | public function getVendorList($sType, $sValue)
{
$oVndTree = oxNew(\OxidEsales\Eshop\Application\Model\VendorList::class);
$oVndTree->loadVendorList();
if ($sType === 'vnd') {
foreach ($oVndTree as $oVendor) {
if ($oVendor->oxvendor__oxid->value == $sValue) {
$oVendor->selected = 1;
break;
}
}
}
return $oVndTree;
} | [
"public",
"function",
"getVendorList",
"(",
"$",
"sType",
",",
"$",
"sValue",
")",
"{",
"$",
"oVndTree",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"VendorList",
"::",
"class",
")",
";",
"$",
"oVndTree... | Load vendor list, mark active category;
@param string $sType active list type
@param string $sValue active list item id
@return oxVendorList | [
"Load",
"vendor",
"list",
"mark",
"active",
"category",
";"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L174-L188 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ArticleList.php | ArticleList.deleteEntry | public function deleteEntry()
{
$sOxId = $this->getEditObjectId();
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
if ($sOxId && $oArticle->load($sOxId)) {
parent::deleteEntry();
}
} | php | public function deleteEntry()
{
$sOxId = $this->getEditObjectId();
$oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
if ($sOxId && $oArticle->load($sOxId)) {
parent::deleteEntry();
}
} | [
"public",
"function",
"deleteEntry",
"(",
")",
"{",
"$",
"sOxId",
"=",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
";",
"$",
"oArticle",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Article",
"::",
... | Deletes entry from the database | [
"Deletes",
"entry",
"from",
"the",
"database"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ArticleList.php#L255-L262 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ShopSeo.php | ShopSeo._loadActiveUrl | protected function _loadActiveUrl($iShopId)
{
$sActObject = null;
if ($this->_sActSeoObject) {
$sActObject = $this->_sActSeoObject;
} elseif (is_array($aStatUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aStaticUrl'))) {
$sActObject = $aStatUrl['oxseo__oxobjectid'];
}
if ($sActObject && $sActObject != '-1') {
$this->_aViewData['sActSeoObject'] = $sActObject;
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$sQ = "select oxseourl, oxlang from oxseo where oxobjectid = " . $oDb->quote($sActObject) . " and oxshopid = " . $oDb->quote($iShopId);
$oRs = $oDb->select($sQ);
if ($oRs != false && $oRs->count() > 0) {
while (!$oRs->EOF) {
$aSeoUrls[$oRs->fields['oxlang']] = [$sActObject, $oRs->fields['oxseourl']];
$oRs->fetchRow();
}
$this->_aViewData['aSeoUrls'] = $aSeoUrls;
}
}
} | php | protected function _loadActiveUrl($iShopId)
{
$sActObject = null;
if ($this->_sActSeoObject) {
$sActObject = $this->_sActSeoObject;
} elseif (is_array($aStatUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aStaticUrl'))) {
$sActObject = $aStatUrl['oxseo__oxobjectid'];
}
if ($sActObject && $sActObject != '-1') {
$this->_aViewData['sActSeoObject'] = $sActObject;
$oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$sQ = "select oxseourl, oxlang from oxseo where oxobjectid = " . $oDb->quote($sActObject) . " and oxshopid = " . $oDb->quote($iShopId);
$oRs = $oDb->select($sQ);
if ($oRs != false && $oRs->count() > 0) {
while (!$oRs->EOF) {
$aSeoUrls[$oRs->fields['oxlang']] = [$sActObject, $oRs->fields['oxseourl']];
$oRs->fetchRow();
}
$this->_aViewData['aSeoUrls'] = $aSeoUrls;
}
}
} | [
"protected",
"function",
"_loadActiveUrl",
"(",
"$",
"iShopId",
")",
"{",
"$",
"sActObject",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"_sActSeoObject",
")",
"{",
"$",
"sActObject",
"=",
"$",
"this",
"->",
"_sActSeoObject",
";",
"}",
"elseif",
"(",... | Loads and sets active url info to view
@param int $iShopId active shop id | [
"Loads",
"and",
"sets",
"active",
"url",
"info",
"to",
"view"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ShopSeo.php#L61-L84 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ShopSeo.php | ShopSeo._processUrls | protected function _processUrls($aUrls)
{
if (isset($aUrls['oxseo__oxstdurl']) && $aUrls['oxseo__oxstdurl']) {
$aUrls['oxseo__oxstdurl'] = $this->_cleanupUrl($aUrls['oxseo__oxstdurl']);
}
if (isset($aUrls['oxseo__oxseourl']) && is_array($aUrls['oxseo__oxseourl'])) {
foreach ($aUrls['oxseo__oxseourl'] as $iPos => $sUrl) {
$aUrls['oxseo__oxseourl'][$iPos] = $this->_cleanupUrl($sUrl);
}
}
return $aUrls;
} | php | protected function _processUrls($aUrls)
{
if (isset($aUrls['oxseo__oxstdurl']) && $aUrls['oxseo__oxstdurl']) {
$aUrls['oxseo__oxstdurl'] = $this->_cleanupUrl($aUrls['oxseo__oxstdurl']);
}
if (isset($aUrls['oxseo__oxseourl']) && is_array($aUrls['oxseo__oxseourl'])) {
foreach ($aUrls['oxseo__oxseourl'] as $iPos => $sUrl) {
$aUrls['oxseo__oxseourl'][$iPos] = $this->_cleanupUrl($sUrl);
}
}
return $aUrls;
} | [
"protected",
"function",
"_processUrls",
"(",
"$",
"aUrls",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"aUrls",
"[",
"'oxseo__oxstdurl'",
"]",
")",
"&&",
"$",
"aUrls",
"[",
"'oxseo__oxstdurl'",
"]",
")",
"{",
"$",
"aUrls",
"[",
"'oxseo__oxstdurl'",
"]",
"="... | Goes through urls array and prepares them for saving to db
@param array $aUrls urls to process
@return array | [
"Goes",
"through",
"urls",
"array",
"and",
"prepares",
"them",
"for",
"saving",
"to",
"db"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ShopSeo.php#L116-L129 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ShopSeo.php | ShopSeo._cleanupUrl | protected function _cleanupUrl($sUrl)
{
// replacing & to & or removing double &&
while ((stripos($sUrl, '&') !== false) || (stripos($sUrl, '&&') !== false)) {
$sUrl = str_replace('&', '&', $sUrl);
$sUrl = str_replace('&&', '&', $sUrl);
}
// converting & to &
return str_replace('&', '&', $sUrl);
} | php | protected function _cleanupUrl($sUrl)
{
// replacing & to & or removing double &&
while ((stripos($sUrl, '&') !== false) || (stripos($sUrl, '&&') !== false)) {
$sUrl = str_replace('&', '&', $sUrl);
$sUrl = str_replace('&&', '&', $sUrl);
}
// converting & to &
return str_replace('&', '&', $sUrl);
} | [
"protected",
"function",
"_cleanupUrl",
"(",
"$",
"sUrl",
")",
"{",
"// replacing & to & or removing double &&",
"while",
"(",
"(",
"stripos",
"(",
"$",
"sUrl",
",",
"'&'",
")",
"!==",
"false",
")",
"||",
"(",
"stripos",
"(",
"$",
"sUrl",
",",
"'&&'"... | processes urls by fixing "&", "&"
@param string $sUrl processable url
@return string | [
"processes",
"urls",
"by",
"fixing",
"&",
";",
"&"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ShopSeo.php#L138-L148 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ShopSeo.php | ShopSeo.deleteStaticUrl | public function deleteStaticUrl()
{
$aStaticUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aStaticUrl');
if (is_array($aStaticUrl)) {
$sObjectid = $aStaticUrl['oxseo__oxobjectid'];
if ($sObjectid && $sObjectid != '-1') {
$this->deleteStaticUrlFromDb($sObjectid);
}
}
} | php | public function deleteStaticUrl()
{
$aStaticUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aStaticUrl');
if (is_array($aStaticUrl)) {
$sObjectid = $aStaticUrl['oxseo__oxobjectid'];
if ($sObjectid && $sObjectid != '-1') {
$this->deleteStaticUrlFromDb($sObjectid);
}
}
} | [
"public",
"function",
"deleteStaticUrl",
"(",
")",
"{",
"$",
"aStaticUrl",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getRequestParameter",
"(",
"'aStaticUrl'",
")",
";",
"if",
"(",
"is_array",... | Deletes static url. | [
"Deletes",
"static",
"url",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ShopSeo.php#L161-L170 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ShopSeo.php | ShopSeo.deleteStaticUrlFromDb | protected function deleteStaticUrlFromDb($staticUrlId)
{
// active shop id
$shopId = $this->getEditObjectId();
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$db->execute("delete from oxseo where oxtype='static' and oxobjectid = " . $db->quote($staticUrlId) . " and oxshopid = " . $db->quote($shopId));
} | php | protected function deleteStaticUrlFromDb($staticUrlId)
{
// active shop id
$shopId = $this->getEditObjectId();
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$db->execute("delete from oxseo where oxtype='static' and oxobjectid = " . $db->quote($staticUrlId) . " and oxshopid = " . $db->quote($shopId));
} | [
"protected",
"function",
"deleteStaticUrlFromDb",
"(",
"$",
"staticUrlId",
")",
"{",
"// active shop id",
"$",
"shopId",
"=",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
";",
"$",
"db",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Databas... | Deletes static url from DB.
@param string $staticUrlId | [
"Deletes",
"static",
"url",
"from",
"DB",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ShopSeo.php#L177-L183 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.getReviewList | public function getReviewList()
{
$currentPage = $this->getActPage();
$itemsPerPage = $this->getItemsPerPage();
$offset = $currentPage * $itemsPerPage;
$userId = $this->getUser()->getId();
$reviewModel = oxNew(Review::class);
$reviewAndRatingList = $reviewModel->getReviewAndRatingListByUserId($userId);
return $this->getPaginatedReviewAndRatingList(
$reviewAndRatingList,
$itemsPerPage,
$offset
);
} | php | public function getReviewList()
{
$currentPage = $this->getActPage();
$itemsPerPage = $this->getItemsPerPage();
$offset = $currentPage * $itemsPerPage;
$userId = $this->getUser()->getId();
$reviewModel = oxNew(Review::class);
$reviewAndRatingList = $reviewModel->getReviewAndRatingListByUserId($userId);
return $this->getPaginatedReviewAndRatingList(
$reviewAndRatingList,
$itemsPerPage,
$offset
);
} | [
"public",
"function",
"getReviewList",
"(",
")",
"{",
"$",
"currentPage",
"=",
"$",
"this",
"->",
"getActPage",
"(",
")",
";",
"$",
"itemsPerPage",
"=",
"$",
"this",
"->",
"getItemsPerPage",
"(",
")",
";",
"$",
"offset",
"=",
"$",
"currentPage",
"*",
"... | Returns Review List
@return array | [
"Returns",
"Review",
"List"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L44-L60 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.deleteReviewAndRating | public function deleteReviewAndRating()
{
if ($this->getSession()->checkSessionChallenge()) {
try {
$this->deleteReview();
$this->deleteRating();
} catch (EntryDoesNotExistDaoException $exception) {
//if user reloads the page after deletion
}
}
} | php | public function deleteReviewAndRating()
{
if ($this->getSession()->checkSessionChallenge()) {
try {
$this->deleteReview();
$this->deleteRating();
} catch (EntryDoesNotExistDaoException $exception) {
//if user reloads the page after deletion
}
}
} | [
"public",
"function",
"deleteReviewAndRating",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"checkSessionChallenge",
"(",
")",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"deleteReview",
"(",
")",
";",
"$",
"this",
"->",
"del... | Delete review and rating, which belongs to the active user. | [
"Delete",
"review",
"and",
"rating",
"which",
"belongs",
"to",
"the",
"active",
"user",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L65-L75 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.getPageNavigation | public function getPageNavigation()
{
$this->_iCntPages = $this->getPagesCount();
$this->_oPageNavigation = $this->generatePageNavigation();
return $this->_oPageNavigation;
} | php | public function getPageNavigation()
{
$this->_iCntPages = $this->getPagesCount();
$this->_oPageNavigation = $this->generatePageNavigation();
return $this->_oPageNavigation;
} | [
"public",
"function",
"getPageNavigation",
"(",
")",
"{",
"$",
"this",
"->",
"_iCntPages",
"=",
"$",
"this",
"->",
"getPagesCount",
"(",
")",
";",
"$",
"this",
"->",
"_oPageNavigation",
"=",
"$",
"this",
"->",
"generatePageNavigation",
"(",
")",
";",
"retu... | Generates the pagination.
@return \stdClass | [
"Generates",
"the",
"pagination",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L101-L107 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.deleteReview | private function deleteReview()
{
$userId = $this->getUser()->getId();
$reviewId = $this->getReviewIdFromRequest();
if ($reviewId) {
$userReviewBridge = $this->getContainer()->get(UserReviewBridgeInterface::class);
$userReviewBridge->deleteReview($userId, $reviewId);
}
} | php | private function deleteReview()
{
$userId = $this->getUser()->getId();
$reviewId = $this->getReviewIdFromRequest();
if ($reviewId) {
$userReviewBridge = $this->getContainer()->get(UserReviewBridgeInterface::class);
$userReviewBridge->deleteReview($userId, $reviewId);
}
} | [
"private",
"function",
"deleteReview",
"(",
")",
"{",
"$",
"userId",
"=",
"$",
"this",
"->",
"getUser",
"(",
")",
"->",
"getId",
"(",
")",
";",
"$",
"reviewId",
"=",
"$",
"this",
"->",
"getReviewIdFromRequest",
"(",
")",
";",
"if",
"(",
"$",
"reviewI... | Deletes Review. | [
"Deletes",
"Review",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L139-L148 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.deleteRating | private function deleteRating()
{
$userId = $this->getUser()->getId();
$ratingId = $this->getRatingIdFromRequest();
if ($ratingId) {
$userRatingBridge = $this->getContainer()->get(UserRatingBridgeInterface::class);
$userRatingBridge->deleteRating($userId, $ratingId);
}
} | php | private function deleteRating()
{
$userId = $this->getUser()->getId();
$ratingId = $this->getRatingIdFromRequest();
if ($ratingId) {
$userRatingBridge = $this->getContainer()->get(UserRatingBridgeInterface::class);
$userRatingBridge->deleteRating($userId, $ratingId);
}
} | [
"private",
"function",
"deleteRating",
"(",
")",
"{",
"$",
"userId",
"=",
"$",
"this",
"->",
"getUser",
"(",
")",
"->",
"getId",
"(",
")",
";",
"$",
"ratingId",
"=",
"$",
"this",
"->",
"getRatingIdFromRequest",
"(",
")",
";",
"if",
"(",
"$",
"ratingI... | Deletes Rating. | [
"Deletes",
"Rating",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L153-L162 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/AccountReviewController.php | AccountReviewController.getTranslatedString | private function getTranslatedString($string)
{
$languageId = Registry::getLang()->getBaseLanguage();
return Registry::getLang()->translateString(
$string,
$languageId,
false
);
} | php | private function getTranslatedString($string)
{
$languageId = Registry::getLang()->getBaseLanguage();
return Registry::getLang()->translateString(
$string,
$languageId,
false
);
} | [
"private",
"function",
"getTranslatedString",
"(",
"$",
"string",
")",
"{",
"$",
"languageId",
"=",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"getBaseLanguage",
"(",
")",
";",
"return",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"translateString",
"(",
... | Returns translated string.
@param string $string
@return string | [
"Returns",
"translated",
"string",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/AccountReviewController.php#L229-L238 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/UserGroupMain.php | UserGroupMain.save | public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
// checkbox handling
if (!isset($aParams['oxgroups__oxactive'])) {
$aParams['oxgroups__oxactive'] = 0;
}
$oGroup = oxNew(\OxidEsales\Eshop\Application\Model\Groups::class);
if ($soxId != "-1") {
$oGroup->load($soxId);
} else {
$aParams['oxgroups__oxid'] = null;
}
$oGroup->setLanguage(0);
$oGroup->assign($aParams);
$oGroup->setLanguage($this->_iEditLang);
$oGroup->save();
// set oxid if inserted
$this->setEditObjectId($oGroup->getId());
} | php | public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
// checkbox handling
if (!isset($aParams['oxgroups__oxactive'])) {
$aParams['oxgroups__oxactive'] = 0;
}
$oGroup = oxNew(\OxidEsales\Eshop\Application\Model\Groups::class);
if ($soxId != "-1") {
$oGroup->load($soxId);
} else {
$aParams['oxgroups__oxid'] = null;
}
$oGroup->setLanguage(0);
$oGroup->assign($aParams);
$oGroup->setLanguage($this->_iEditLang);
$oGroup->save();
// set oxid if inserted
$this->setEditObjectId($oGroup->getId());
} | [
"public",
"function",
"save",
"(",
")",
"{",
"parent",
"::",
"save",
"(",
")",
";",
"$",
"soxId",
"=",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
";",
"$",
"aParams",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
... | Saves changed usergroup parameters. | [
"Saves",
"changed",
"usergroup",
"parameters",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/UserGroupMain.php#L71-L96 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/ThemeMain.php | ThemeMain.themeInConfigFile | public function themeInConfigFile()
{
$blThemeSet = isset(\OxidEsales\Eshop\Core\Registry::getConfig()->sTheme);
$blCustomThemeSet = isset(\OxidEsales\Eshop\Core\Registry::getConfig()->sCustomTheme);
return ($blThemeSet || $blCustomThemeSet);
} | php | public function themeInConfigFile()
{
$blThemeSet = isset(\OxidEsales\Eshop\Core\Registry::getConfig()->sTheme);
$blCustomThemeSet = isset(\OxidEsales\Eshop\Core\Registry::getConfig()->sCustomTheme);
return ($blThemeSet || $blCustomThemeSet);
} | [
"public",
"function",
"themeInConfigFile",
"(",
")",
"{",
"$",
"blThemeSet",
"=",
"isset",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"sTheme",
")",
";",
"$",
"blCustomThemeSet",
"=",
"isset",... | Check if theme config is in config file.
@return bool | [
"Check",
"if",
"theme",
"config",
"is",
"in",
"config",
"file",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ThemeMain.php#L58-L64 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._getLanguageInfo | protected function _getLanguageInfo($sOxId)
{
$sDefaultLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sDefaultLang');
$aLangData = $this->_aLangData['params'][$sOxId];
$aLangData['abbr'] = $sOxId;
$aLangData['desc'] = $this->_aLangData['lang'][$sOxId];
$aLangData['baseurl'] = $this->_aLangData['urls'][$aLangData['baseId']];
$aLangData['basesslurl'] = $this->_aLangData['sslUrls'][$aLangData['baseId']];
$aLangData['default'] = ($this->_aLangData['params'][$sOxId]["baseId"] == $sDefaultLang) ? true : false;
return $aLangData;
} | php | protected function _getLanguageInfo($sOxId)
{
$sDefaultLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sDefaultLang');
$aLangData = $this->_aLangData['params'][$sOxId];
$aLangData['abbr'] = $sOxId;
$aLangData['desc'] = $this->_aLangData['lang'][$sOxId];
$aLangData['baseurl'] = $this->_aLangData['urls'][$aLangData['baseId']];
$aLangData['basesslurl'] = $this->_aLangData['sslUrls'][$aLangData['baseId']];
$aLangData['default'] = ($this->_aLangData['params'][$sOxId]["baseId"] == $sDefaultLang) ? true : false;
return $aLangData;
} | [
"protected",
"function",
"_getLanguageInfo",
"(",
"$",
"sOxId",
")",
"{",
"$",
"sDefaultLang",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'sDefaultLang'",
")",
";",
"$",
... | Get selected language info
@param string $sOxId language abbervation
@return array | [
"Get",
"selected",
"language",
"info"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L186-L198 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._getLanguages | protected function _getLanguages()
{
$aLangData['params'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageParams');
$aLangData['lang'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguages');
$aLangData['urls'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageURLs');
$aLangData['sslUrls'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageSSLURLs');
// empty languages parameters array - creating new one with default values
if (!is_array($aLangData['params'])) {
$aLangData['params'] = $this->_assignDefaultLangParams($aLangData['lang']);
}
return $aLangData;
} | php | protected function _getLanguages()
{
$aLangData['params'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageParams');
$aLangData['lang'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguages');
$aLangData['urls'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageURLs');
$aLangData['sslUrls'] = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aLanguageSSLURLs');
// empty languages parameters array - creating new one with default values
if (!is_array($aLangData['params'])) {
$aLangData['params'] = $this->_assignDefaultLangParams($aLangData['lang']);
}
return $aLangData;
} | [
"protected",
"function",
"_getLanguages",
"(",
")",
"{",
"$",
"aLangData",
"[",
"'params'",
"]",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'aLanguageParams'",
")",
";",
... | Loads from config all data related with languages.
If no languages parameters array exists, sets default parameters values.
Returns collected languages parameters array.
@return array | [
"Loads",
"from",
"config",
"all",
"data",
"related",
"with",
"languages",
".",
"If",
"no",
"languages",
"parameters",
"array",
"exists",
"sets",
"default",
"parameters",
"values",
".",
"Returns",
"collected",
"languages",
"parameters",
"array",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L217-L230 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._updateAbbervation | protected function _updateAbbervation($sOldId, $sNewId)
{
foreach (array_keys($this->_aLangData) as $sTypeKey) {
if (is_array($this->_aLangData[$sTypeKey]) && count($this->_aLangData[$sTypeKey]) > 0) {
if ($sTypeKey == 'urls' || $sTypeKey == 'sslUrls') {
continue;
}
$aKeys = array_keys($this->_aLangData[$sTypeKey]);
$aValues = array_values($this->_aLangData[$sTypeKey]);
//find and replace key
$iReplaceId = array_search($sOldId, $aKeys);
$aKeys[$iReplaceId] = $sNewId;
$this->_aLangData[$sTypeKey] = array_combine($aKeys, $aValues);
}
}
} | php | protected function _updateAbbervation($sOldId, $sNewId)
{
foreach (array_keys($this->_aLangData) as $sTypeKey) {
if (is_array($this->_aLangData[$sTypeKey]) && count($this->_aLangData[$sTypeKey]) > 0) {
if ($sTypeKey == 'urls' || $sTypeKey == 'sslUrls') {
continue;
}
$aKeys = array_keys($this->_aLangData[$sTypeKey]);
$aValues = array_values($this->_aLangData[$sTypeKey]);
//find and replace key
$iReplaceId = array_search($sOldId, $aKeys);
$aKeys[$iReplaceId] = $sNewId;
$this->_aLangData[$sTypeKey] = array_combine($aKeys, $aValues);
}
}
} | [
"protected",
"function",
"_updateAbbervation",
"(",
"$",
"sOldId",
",",
"$",
"sNewId",
")",
"{",
"foreach",
"(",
"array_keys",
"(",
"$",
"this",
"->",
"_aLangData",
")",
"as",
"$",
"sTypeKey",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"_... | Replaces languages arrays keys by new value.
@param string $sOldId old ID
@param string $sNewId new ID | [
"Replaces",
"languages",
"arrays",
"keys",
"by",
"new",
"value",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L238-L255 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._sortLangArraysByBaseId | protected function _sortLangArraysByBaseId()
{
$aUrls = [];
$aSslUrls = [];
$aLanguages = [];
uasort($this->_aLangData['params'], [$this, '_sortLangParamsByBaseIdCallback']);
foreach ($this->_aLangData['params'] as $sAbbr => $aParams) {
$iId = (int) $aParams['baseId'];
$aUrls[$iId] = $this->_aLangData['urls'][$iId];
$aSslUrls[$iId] = $this->_aLangData['sslUrls'][$iId];
$aLanguages[$sAbbr] = $this->_aLangData['lang'][$sAbbr];
}
$this->_aLangData['lang'] = $aLanguages;
$this->_aLangData['urls'] = $aUrls;
$this->_aLangData['sslUrls'] = $aSslUrls;
} | php | protected function _sortLangArraysByBaseId()
{
$aUrls = [];
$aSslUrls = [];
$aLanguages = [];
uasort($this->_aLangData['params'], [$this, '_sortLangParamsByBaseIdCallback']);
foreach ($this->_aLangData['params'] as $sAbbr => $aParams) {
$iId = (int) $aParams['baseId'];
$aUrls[$iId] = $this->_aLangData['urls'][$iId];
$aSslUrls[$iId] = $this->_aLangData['sslUrls'][$iId];
$aLanguages[$sAbbr] = $this->_aLangData['lang'][$sAbbr];
}
$this->_aLangData['lang'] = $aLanguages;
$this->_aLangData['urls'] = $aUrls;
$this->_aLangData['sslUrls'] = $aSslUrls;
} | [
"protected",
"function",
"_sortLangArraysByBaseId",
"(",
")",
"{",
"$",
"aUrls",
"=",
"[",
"]",
";",
"$",
"aSslUrls",
"=",
"[",
"]",
";",
"$",
"aLanguages",
"=",
"[",
"]",
";",
"uasort",
"(",
"$",
"this",
"->",
"_aLangData",
"[",
"'params'",
"]",
","... | Sort languages, languages parameters, urls, ssl urls arrays according
base land ID | [
"Sort",
"languages",
"languages",
"parameters",
"urls",
"ssl",
"urls",
"arrays",
"according",
"base",
"land",
"ID"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L261-L279 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._assignDefaultLangParams | protected function _assignDefaultLangParams($aLanguages)
{
$aParams = [];
$iBaseId = 0;
foreach (array_keys($aLanguages) as $sOxId) {
$aParams[$sOxId]['baseId'] = $iBaseId;
$aParams[$sOxId]['active'] = 1;
$aParams[$sOxId]['sort'] = $iBaseId + 1;
$iBaseId++;
}
return $aParams;
} | php | protected function _assignDefaultLangParams($aLanguages)
{
$aParams = [];
$iBaseId = 0;
foreach (array_keys($aLanguages) as $sOxId) {
$aParams[$sOxId]['baseId'] = $iBaseId;
$aParams[$sOxId]['active'] = 1;
$aParams[$sOxId]['sort'] = $iBaseId + 1;
$iBaseId++;
}
return $aParams;
} | [
"protected",
"function",
"_assignDefaultLangParams",
"(",
"$",
"aLanguages",
")",
"{",
"$",
"aParams",
"=",
"[",
"]",
";",
"$",
"iBaseId",
"=",
"0",
";",
"foreach",
"(",
"array_keys",
"(",
"$",
"aLanguages",
")",
"as",
"$",
"sOxId",
")",
"{",
"$",
"aPa... | Assign default values for eache language
@param array $aLanguages language array
@return array | [
"Assign",
"default",
"values",
"for",
"eache",
"language"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L288-L302 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._setDefaultLang | protected function _setDefaultLang($sOxId)
{
$sDefaultId = $this->_aLangData['params'][$sOxId]['baseId'];
\OxidEsales\Eshop\Core\Registry::getConfig()->saveShopConfVar('str', 'sDefaultLang', $sDefaultId);
} | php | protected function _setDefaultLang($sOxId)
{
$sDefaultId = $this->_aLangData['params'][$sOxId]['baseId'];
\OxidEsales\Eshop\Core\Registry::getConfig()->saveShopConfVar('str', 'sDefaultLang', $sDefaultId);
} | [
"protected",
"function",
"_setDefaultLang",
"(",
"$",
"sOxId",
")",
"{",
"$",
"sDefaultId",
"=",
"$",
"this",
"->",
"_aLangData",
"[",
"'params'",
"]",
"[",
"$",
"sOxId",
"]",
"[",
"'baseId'",
"]",
";",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
... | Sets default language base ID to config var 'sDefaultLang'
@param string $sOxId language abbervation | [
"Sets",
"default",
"language",
"base",
"ID",
"to",
"config",
"var",
"sDefaultLang"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L309-L313 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._getAvailableLangBaseId | protected function _getAvailableLangBaseId()
{
$aBaseId = [];
foreach ($this->_aLangData['params'] as $aLang) {
$aBaseId[] = $aLang['baseId'];
}
$iNewId = 0;
sort($aBaseId);
$iTotal = count($aBaseId);
//getting first available id
while ($iNewId <= $iTotal) {
if ($iNewId !== $aBaseId[$iNewId]) {
break;
}
$iNewId++;
}
return $iNewId;
} | php | protected function _getAvailableLangBaseId()
{
$aBaseId = [];
foreach ($this->_aLangData['params'] as $aLang) {
$aBaseId[] = $aLang['baseId'];
}
$iNewId = 0;
sort($aBaseId);
$iTotal = count($aBaseId);
//getting first available id
while ($iNewId <= $iTotal) {
if ($iNewId !== $aBaseId[$iNewId]) {
break;
}
$iNewId++;
}
return $iNewId;
} | [
"protected",
"function",
"_getAvailableLangBaseId",
"(",
")",
"{",
"$",
"aBaseId",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"_aLangData",
"[",
"'params'",
"]",
"as",
"$",
"aLang",
")",
"{",
"$",
"aBaseId",
"[",
"]",
"=",
"$",
"aLang",
"... | Get availabale language base ID
@return int | [
"Get",
"availabale",
"language",
"base",
"ID"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L320-L340 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._checkLangTranslations | protected function _checkLangTranslations($sOxId)
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sDir = dirname($myConfig->getTranslationsDir('lang.php', $sOxId));
if (empty($sDir)) {
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\ExceptionToDisplay::class);
$oEx->setMessage('LANGUAGE_NOTRANSLATIONS_WARNING');
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
}
} | php | protected function _checkLangTranslations($sOxId)
{
$myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
$sDir = dirname($myConfig->getTranslationsDir('lang.php', $sOxId));
if (empty($sDir)) {
$oEx = oxNew(\OxidEsales\Eshop\Core\Exception\ExceptionToDisplay::class);
$oEx->setMessage('LANGUAGE_NOTRANSLATIONS_WARNING');
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
}
} | [
"protected",
"function",
"_checkLangTranslations",
"(",
"$",
"sOxId",
")",
"{",
"$",
"myConfig",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getConfig",
"(",
")",
";",
"$",
"sDir",
"=",
"dirname",
"(",
"$",
"myConfig",
... | Check selected language has translation file lang.php
If not - displays warning
@param string $sOxId language abbervation | [
"Check",
"selected",
"language",
"has",
"translation",
"file",
"lang",
".",
"php",
"If",
"not",
"-",
"displays",
"warning"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L348-L359 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._checkMultilangFieldsExistsInDb | protected function _checkMultilangFieldsExistsInDb($sOxId)
{
$iBaseId = $this->_aLangData['params'][$sOxId]['baseId'];
$sTable = getLangTableName('oxarticles', $iBaseId);
$sColumn = 'oxtitle' . \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag($iBaseId);
$oDbMetadata = oxNew(\OxidEsales\Eshop\Core\DbMetaDataHandler::class);
return $oDbMetadata->tableExists($sTable) && $oDbMetadata->fieldExists($sColumn, $sTable);
} | php | protected function _checkMultilangFieldsExistsInDb($sOxId)
{
$iBaseId = $this->_aLangData['params'][$sOxId]['baseId'];
$sTable = getLangTableName('oxarticles', $iBaseId);
$sColumn = 'oxtitle' . \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag($iBaseId);
$oDbMetadata = oxNew(\OxidEsales\Eshop\Core\DbMetaDataHandler::class);
return $oDbMetadata->tableExists($sTable) && $oDbMetadata->fieldExists($sColumn, $sTable);
} | [
"protected",
"function",
"_checkMultilangFieldsExistsInDb",
"(",
"$",
"sOxId",
")",
"{",
"$",
"iBaseId",
"=",
"$",
"this",
"->",
"_aLangData",
"[",
"'params'",
"]",
"[",
"$",
"sOxId",
"]",
"[",
"'baseId'",
"]",
";",
"$",
"sTable",
"=",
"getLangTableName",
... | Check if selected language already has multilanguage fields in DB
@param string $sOxId language abbervation
@return bool | [
"Check",
"if",
"selected",
"language",
"already",
"has",
"multilanguage",
"fields",
"in",
"DB"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L368-L377 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain._validateInput | protected function _validateInput()
{
$result = true;
$oxid = $this->getEditObjectId();
$parameters = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
// if creating new language, checking if language already exists with
// entered language abbreviation
if (($oxid == -1) && $this->_checkLangExists($parameters['abbr'])) {
$this->addDisplayException('LANGUAGE_ALREADYEXISTS_ERROR');
$result = false;
}
// As the abbreviation is used in database view creation, check for allowed characters
if (!$this->checkAbbreviationAllowedCharacters($parameters['abbr'])) {
$this->addDisplayException('LANGUAGE_ABBREVIATION_INVALID_ERROR');
$result = false;
}
// checking if language name is not empty
if (empty($parameters['desc'])) {
$this->addDisplayException('LANGUAGE_EMPTYLANGUAGENAME_ERROR');
$result = false;
}
return $result;
} | php | protected function _validateInput()
{
$result = true;
$oxid = $this->getEditObjectId();
$parameters = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
// if creating new language, checking if language already exists with
// entered language abbreviation
if (($oxid == -1) && $this->_checkLangExists($parameters['abbr'])) {
$this->addDisplayException('LANGUAGE_ALREADYEXISTS_ERROR');
$result = false;
}
// As the abbreviation is used in database view creation, check for allowed characters
if (!$this->checkAbbreviationAllowedCharacters($parameters['abbr'])) {
$this->addDisplayException('LANGUAGE_ABBREVIATION_INVALID_ERROR');
$result = false;
}
// checking if language name is not empty
if (empty($parameters['desc'])) {
$this->addDisplayException('LANGUAGE_EMPTYLANGUAGENAME_ERROR');
$result = false;
}
return $result;
} | [
"protected",
"function",
"_validateInput",
"(",
")",
"{",
"$",
"result",
"=",
"true",
";",
"$",
"oxid",
"=",
"$",
"this",
"->",
"getEditObjectId",
"(",
")",
";",
"$",
"parameters",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
... | Check language input errors
@return bool | [
"Check",
"language",
"input",
"errors"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L440-L467 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain.addDisplayException | protected function addDisplayException($message)
{
$exception = oxNew(\OxidEsales\Eshop\Core\Exception\ExceptionToDisplay::class);
$exception->setMessage($message);
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($exception);
} | php | protected function addDisplayException($message)
{
$exception = oxNew(\OxidEsales\Eshop\Core\Exception\ExceptionToDisplay::class);
$exception->setMessage($message);
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($exception);
} | [
"protected",
"function",
"addDisplayException",
"(",
"$",
"message",
")",
"{",
"$",
"exception",
"=",
"oxNew",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Exception",
"\\",
"ExceptionToDisplay",
"::",
"class",
")",
";",
"$",
"exception",
"->... | Add exception to be displayed in frontend.
@param string $message Language constant | [
"Add",
"exception",
"to",
"be",
"displayed",
"in",
"frontend",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L497-L502 | train |
OXID-eSales/oxideshop_ce | source/Application/Controller/Admin/LanguageMain.php | LanguageMain.isValidLanguageData | protected function isValidLanguageData($aLanguageData)
{
$blValid = true;
$configValidator = $this->getNoJsValidator();
foreach ($aLanguageData as $mLanguageDataParameters) {
if (is_array($mLanguageDataParameters)) {
// Recursion till we gonna have a string.
$blDeepResult = $this->isValidLanguageData($mLanguageDataParameters);
$blValid = $blDeepResult === false ? $blDeepResult : $blValid;
} elseif (!$configValidator->isValid($mLanguageDataParameters)) {
$blValid = false;
$error = oxNew(\OxidEsales\Eshop\Core\DisplayError::class);
$error->setFormatParameters(htmlspecialchars($mLanguageDataParameters));
$error->setMessage("SHOP_CONFIG_ERROR_INVALID_VALUE");
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($error);
}
}
return $blValid;
} | php | protected function isValidLanguageData($aLanguageData)
{
$blValid = true;
$configValidator = $this->getNoJsValidator();
foreach ($aLanguageData as $mLanguageDataParameters) {
if (is_array($mLanguageDataParameters)) {
// Recursion till we gonna have a string.
$blDeepResult = $this->isValidLanguageData($mLanguageDataParameters);
$blValid = $blDeepResult === false ? $blDeepResult : $blValid;
} elseif (!$configValidator->isValid($mLanguageDataParameters)) {
$blValid = false;
$error = oxNew(\OxidEsales\Eshop\Core\DisplayError::class);
$error->setFormatParameters(htmlspecialchars($mLanguageDataParameters));
$error->setMessage("SHOP_CONFIG_ERROR_INVALID_VALUE");
\OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($error);
}
}
return $blValid;
} | [
"protected",
"function",
"isValidLanguageData",
"(",
"$",
"aLanguageData",
")",
"{",
"$",
"blValid",
"=",
"true",
";",
"$",
"configValidator",
"=",
"$",
"this",
"->",
"getNoJsValidator",
"(",
")",
";",
"foreach",
"(",
"$",
"aLanguageData",
"as",
"$",
"mLangu... | Validates provided language data and sets error to view in case it is not valid.
@param array $aLanguageData
@return bool | [
"Validates",
"provided",
"language",
"data",
"and",
"sets",
"error",
"to",
"view",
"in",
"case",
"it",
"is",
"not",
"valid",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/LanguageMain.php#L511-L530 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getHomeLink | public function getHomeLink()
{
if (($sValue = $this->getViewConfigParam('homeLink')) === null) {
$sValue = null;
$blAddStartCl = $this->isStartClassRequired();
if ($blAddStartCl) {
$baseLanguage = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
$sValue = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->getStaticUrl($this->getSelfLink() . 'cl=start', $baseLanguage);
$sValue = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendUrl(
$sValue,
\OxidEsales\Eshop\Core\Registry::getUtilsUrl()->getBaseAddUrlParams()
);
$sValue = getStr()->preg_replace('/(\?|&(amp;)?)$/', '', $sValue);
}
if (!$sValue) {
$sValue = getStr()->preg_replace('#index.php\??$#', '', $this->getSelfLink());
}
$this->setViewConfigParam('homeLink', $sValue);
}
return $sValue;
} | php | public function getHomeLink()
{
if (($sValue = $this->getViewConfigParam('homeLink')) === null) {
$sValue = null;
$blAddStartCl = $this->isStartClassRequired();
if ($blAddStartCl) {
$baseLanguage = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
$sValue = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->getStaticUrl($this->getSelfLink() . 'cl=start', $baseLanguage);
$sValue = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendUrl(
$sValue,
\OxidEsales\Eshop\Core\Registry::getUtilsUrl()->getBaseAddUrlParams()
);
$sValue = getStr()->preg_replace('/(\?|&(amp;)?)$/', '', $sValue);
}
if (!$sValue) {
$sValue = getStr()->preg_replace('#index.php\??$#', '', $this->getSelfLink());
}
$this->setViewConfigParam('homeLink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getHomeLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'homeLink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"null",
";",
"$",
"blAddStartCl",
"=",
"$",
"th... | Returns shops home link
@return string | [
"Returns",
"shops",
"home",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L72-L96 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.isStartClassRequired | protected function isStartClassRequired()
{
$baseLanguage = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
$shopConfig = $this->getConfig();
$isSeoActive = \OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive();
return $isSeoActive && ($baseLanguage != $shopConfig->getConfigParam('sDefaultLang'));
} | php | protected function isStartClassRequired()
{
$baseLanguage = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
$shopConfig = $this->getConfig();
$isSeoActive = \OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive();
return $isSeoActive && ($baseLanguage != $shopConfig->getConfigParam('sDefaultLang'));
} | [
"protected",
"function",
"isStartClassRequired",
"(",
")",
"{",
"$",
"baseLanguage",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
"\\",
"Registry",
"::",
"getLang",
"(",
")",
"->",
"getBaseLanguage",
"(",
")",
";",
"$",
"shopConfig",
"=",
"$",
"th... | Check if some shop selection page must be shown
@return bool | [
"Check",
"if",
"some",
"shop",
"selection",
"page",
"must",
"be",
"shown"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L103-L110 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getLogoutLink | public function getLogoutLink()
{
$sClass = $this->getTopActionClassName();
$sCatnid = $this->getActCatId();
$sMnfid = $this->getActManufacturerId();
$sArtnid = $this->getActArticleId();
$sTplName = $this->getActTplName();
$sContentLoadId = $this->getActContentLoadId();
$sSearchParam = $this->getActSearchParam();
// @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
$sRecommId = $this->getActRecommendationId();
// END deprecated
$sListType = $this->getActListType();
$oConfig = $this->getConfig();
return ($oConfig->isSsl() ? $oConfig->getShopSecureHomeUrl() : $oConfig->getShopHomeUrl())
. "cl={$sClass}"
. ($sCatnid ? "&cnid={$sCatnid}" : '')
. ($sArtnid ? "&anid={$sArtnid}" : '')
. ($sMnfid ? "&mnid={$sMnfid}" : '')
. ($sSearchParam ? "&searchparam={$sSearchParam}" : '')
// @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
. ($sRecommId ? "&recommid={$sRecommId}" : '')
// END deprecated
. ($sListType ? "&listtype={$sListType}" : '')
. "&fnc=logout"
. ($sTplName ? "&tpl=" . basename($sTplName) : '')
. ($sContentLoadId ? "&oxloadid=" . $sContentLoadId : '')
. "&redirect=1";
} | php | public function getLogoutLink()
{
$sClass = $this->getTopActionClassName();
$sCatnid = $this->getActCatId();
$sMnfid = $this->getActManufacturerId();
$sArtnid = $this->getActArticleId();
$sTplName = $this->getActTplName();
$sContentLoadId = $this->getActContentLoadId();
$sSearchParam = $this->getActSearchParam();
// @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
$sRecommId = $this->getActRecommendationId();
// END deprecated
$sListType = $this->getActListType();
$oConfig = $this->getConfig();
return ($oConfig->isSsl() ? $oConfig->getShopSecureHomeUrl() : $oConfig->getShopHomeUrl())
. "cl={$sClass}"
. ($sCatnid ? "&cnid={$sCatnid}" : '')
. ($sArtnid ? "&anid={$sArtnid}" : '')
. ($sMnfid ? "&mnid={$sMnfid}" : '')
. ($sSearchParam ? "&searchparam={$sSearchParam}" : '')
// @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
. ($sRecommId ? "&recommid={$sRecommId}" : '')
// END deprecated
. ($sListType ? "&listtype={$sListType}" : '')
. "&fnc=logout"
. ($sTplName ? "&tpl=" . basename($sTplName) : '')
. ($sContentLoadId ? "&oxloadid=" . $sContentLoadId : '')
. "&redirect=1";
} | [
"public",
"function",
"getLogoutLink",
"(",
")",
"{",
"$",
"sClass",
"=",
"$",
"this",
"->",
"getTopActionClassName",
"(",
")",
";",
"$",
"sCatnid",
"=",
"$",
"this",
"->",
"getActCatId",
"(",
")",
";",
"$",
"sMnfid",
"=",
"$",
"this",
"->",
"getActMan... | Returns shop logout link
@return string | [
"Returns",
"shop",
"logout",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L153-L183 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getHelpPageLink | public function getHelpPageLink()
{
if ($this->_sHelpPageLink === null) {
$this->_sHelpPageLink = "";
$aContentIdents = $this->_getHelpContentIdents();
$oContent = oxNew(\OxidEsales\Eshop\Application\Model\Content::class);
foreach ($aContentIdents as $sIdent) {
if ($oContent->loadByIdent($sIdent, true)) {
$this->_sHelpPageLink = $oContent->getLink();
break;
}
}
}
return $this->_sHelpPageLink;
} | php | public function getHelpPageLink()
{
if ($this->_sHelpPageLink === null) {
$this->_sHelpPageLink = "";
$aContentIdents = $this->_getHelpContentIdents();
$oContent = oxNew(\OxidEsales\Eshop\Application\Model\Content::class);
foreach ($aContentIdents as $sIdent) {
if ($oContent->loadByIdent($sIdent, true)) {
$this->_sHelpPageLink = $oContent->getLink();
break;
}
}
}
return $this->_sHelpPageLink;
} | [
"public",
"function",
"getHelpPageLink",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_sHelpPageLink",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"_sHelpPageLink",
"=",
"\"\"",
";",
"$",
"aContentIdents",
"=",
"$",
"this",
"->",
"_getHelpContentIdents",
... | Returns shop help link
@return string | [
"Returns",
"shop",
"help",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L202-L217 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getViewConfigParam | public function getViewConfigParam($sName)
{
startProfile('\OxidEsales\Eshop\Core\ViewConfig::getViewConfigParam');
if ($this->_oShop && isset($this->_oShop->$sName)) {
$sValue = $this->_oShop->$sName;
} elseif ($this->_aViewData && isset($this->_aViewData[$sName])) {
$sValue = $this->_aViewData[$sName];
} else {
$sValue = (isset($this->_aConfigParams[$sName]) ? $this->_aConfigParams[$sName] : null);
}
stopProfile('\OxidEsales\Eshop\Core\ViewConfig::getViewConfigParam');
return $sValue;
} | php | public function getViewConfigParam($sName)
{
startProfile('\OxidEsales\Eshop\Core\ViewConfig::getViewConfigParam');
if ($this->_oShop && isset($this->_oShop->$sName)) {
$sValue = $this->_oShop->$sName;
} elseif ($this->_aViewData && isset($this->_aViewData[$sName])) {
$sValue = $this->_aViewData[$sName];
} else {
$sValue = (isset($this->_aConfigParams[$sName]) ? $this->_aConfigParams[$sName] : null);
}
stopProfile('\OxidEsales\Eshop\Core\ViewConfig::getViewConfigParam');
return $sValue;
} | [
"public",
"function",
"getViewConfigParam",
"(",
"$",
"sName",
")",
"{",
"startProfile",
"(",
"'\\OxidEsales\\Eshop\\Core\\ViewConfig::getViewConfigParam'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"_oShop",
"&&",
"isset",
"(",
"$",
"this",
"->",
"_oShop",
"->",
... | Returns current view config parameter
@param string $sName name of parameter to get
@return mixed | [
"Returns",
"current",
"view",
"config",
"parameter"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L315-L330 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getHiddenSid | public function getHiddenSid()
{
if (($sValue = $this->getViewConfigParam('hiddensid')) === null) {
$sValue = $this->getSession()->hiddenSid();
// appending language info to form
if (($sLang = \OxidEsales\Eshop\Core\Registry::getLang()->getFormLang())) {
$sValue .= "\n{$sLang}";
}
$sValue .= $this->getAdditionalRequestParameters();
$this->setViewConfigParam('hiddensid', $sValue);
}
return $sValue;
} | php | public function getHiddenSid()
{
if (($sValue = $this->getViewConfigParam('hiddensid')) === null) {
$sValue = $this->getSession()->hiddenSid();
// appending language info to form
if (($sLang = \OxidEsales\Eshop\Core\Registry::getLang()->getFormLang())) {
$sValue .= "\n{$sLang}";
}
$sValue .= $this->getAdditionalRequestParameters();
$this->setViewConfigParam('hiddensid', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getHiddenSid",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'hiddensid'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getSession",
"(",
")",
"-... | Returns forms hidden session parameters
@return string | [
"Returns",
"forms",
"hidden",
"session",
"parameters"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L367-L383 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getSelfLink | public function getSelfLink()
{
if (($sValue = $this->getViewConfigParam('selflink')) === null) {
$sValue = $this->getConfig()->getShopHomeUrl();
$this->setViewConfigParam('selflink', $sValue);
}
return $sValue;
} | php | public function getSelfLink()
{
if (($sValue = $this->getViewConfigParam('selflink')) === null) {
$sValue = $this->getConfig()->getShopHomeUrl();
$this->setViewConfigParam('selflink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getSelfLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'selflink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",... | Returns shops self link
@return string | [
"Returns",
"shops",
"self",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L400-L408 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getSslSelfLink | public function getSslSelfLink()
{
if ($this->isAdmin()) {
// using getSelfLink() method in admin mode (#2745)
return $this->getSelfLink();
}
if (($sValue = $this->getViewConfigParam('sslselflink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeURL();
$this->setViewConfigParam('sslselflink', $sValue);
}
return $sValue;
} | php | public function getSslSelfLink()
{
if ($this->isAdmin()) {
// using getSelfLink() method in admin mode (#2745)
return $this->getSelfLink();
}
if (($sValue = $this->getViewConfigParam('sslselflink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeURL();
$this->setViewConfigParam('sslselflink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getSslSelfLink",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAdmin",
"(",
")",
")",
"{",
"// using getSelfLink() method in admin mode (#2745)",
"return",
"$",
"this",
"->",
"getSelfLink",
"(",
")",
";",
"}",
"if",
"(",
"(",
"$",
... | Returns shops self ssl link
@return string | [
"Returns",
"shops",
"self",
"ssl",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L415-L428 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getBaseDir | public function getBaseDir()
{
if (($sValue = $this->getViewConfigParam('basedir')) === null) {
if ($this->getConfig()->isSsl()) {
$sValue = $this->getConfig()->getSSLShopURL();
} else {
$sValue = $this->getConfig()->getShopURL();
}
$this->setViewConfigParam('basedir', $sValue);
}
return $sValue;
} | php | public function getBaseDir()
{
if (($sValue = $this->getViewConfigParam('basedir')) === null) {
if ($this->getConfig()->isSsl()) {
$sValue = $this->getConfig()->getSSLShopURL();
} else {
$sValue = $this->getConfig()->getShopURL();
}
$this->setViewConfigParam('basedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getBaseDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'basedir'",
")",
")",
"===",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"isSsl",
... | Returns shops base directory path
@return string | [
"Returns",
"shops",
"base",
"directory",
"path"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L435-L448 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getCoreUtilsDir | public function getCoreUtilsDir()
{
if (($sValue = $this->getViewConfigParam('coreutilsdir')) === null) {
$sValue = $this->getConfig()->getCoreUtilsURL();
$this->setViewConfigParam('coreutilsdir', $sValue);
}
return $sValue;
} | php | public function getCoreUtilsDir()
{
if (($sValue = $this->getViewConfigParam('coreutilsdir')) === null) {
$sValue = $this->getConfig()->getCoreUtilsURL();
$this->setViewConfigParam('coreutilsdir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getCoreUtilsDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'coreutilsdir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",... | Returns shops utility directory path
@return string | [
"Returns",
"shops",
"utility",
"directory",
"path"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L455-L463 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getSelfActionLink | public function getSelfActionLink()
{
if (($sValue = $this->getViewConfigParam('selfactionlink')) === null) {
$sValue = $this->getConfig()->getShopCurrentUrl();
$this->setViewConfigParam('selfactionlink', $sValue);
}
return $sValue;
} | php | public function getSelfActionLink()
{
if (($sValue = $this->getViewConfigParam('selfactionlink')) === null) {
$sValue = $this->getConfig()->getShopCurrentUrl();
$this->setViewConfigParam('selfactionlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getSelfActionLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'selfactionlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
... | Returns shops action link
@return string | [
"Returns",
"shops",
"action",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L470-L478 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getCurrentHomeDir | public function getCurrentHomeDir()
{
if (($sValue = $this->getViewConfigParam('currenthomedir')) === null) {
$sValue = $this->getConfig()->getCurrentShopUrl();
$this->setViewConfigParam('currenthomedir', $sValue);
}
return $sValue;
} | php | public function getCurrentHomeDir()
{
if (($sValue = $this->getViewConfigParam('currenthomedir')) === null) {
$sValue = $this->getConfig()->getCurrentShopUrl();
$this->setViewConfigParam('currenthomedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getCurrentHomeDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'currenthomedir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
... | Returns shops home path
@return string | [
"Returns",
"shops",
"home",
"path"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L485-L493 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getBasketLink | public function getBasketLink()
{
if (($sValue = $this->getViewConfigParam('basketlink')) === null) {
$sValue = $this->getConfig()->getShopHomeUrl() . 'cl=basket';
$this->setViewConfigParam('basketlink', $sValue);
}
return $sValue;
} | php | public function getBasketLink()
{
if (($sValue = $this->getViewConfigParam('basketlink')) === null) {
$sValue = $this->getConfig()->getShopHomeUrl() . 'cl=basket';
$this->setViewConfigParam('basketlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getBasketLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'basketlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"... | Returns shops basket link
@return string | [
"Returns",
"shops",
"basket",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L500-L508 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getOrderLink | public function getOrderLink()
{
if (($sValue = $this->getViewConfigParam('orderlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=user';
$this->setViewConfigParam('orderlink', $sValue);
}
return $sValue;
} | php | public function getOrderLink()
{
if (($sValue = $this->getViewConfigParam('orderlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=user';
$this->setViewConfigParam('orderlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getOrderLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'orderlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->... | Returns shops order link
@return string | [
"Returns",
"shops",
"order",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L515-L523 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getPaymentLink | public function getPaymentLink()
{
if (($sValue = $this->getViewConfigParam('paymentlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=payment';
$this->setViewConfigParam('paymentlink', $sValue);
}
return $sValue;
} | php | public function getPaymentLink()
{
if (($sValue = $this->getViewConfigParam('paymentlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=payment';
$this->setViewConfigParam('paymentlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getPaymentLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'paymentlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
... | Returns shops payment link
@return string | [
"Returns",
"shops",
"payment",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L530-L538 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getExeOrderLink | public function getExeOrderLink()
{
if (($sValue = $this->getViewConfigParam('exeorderlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=order&fnc=execute';
$this->setViewConfigParam('exeorderlink', $sValue);
}
return $sValue;
} | php | public function getExeOrderLink()
{
if (($sValue = $this->getViewConfigParam('exeorderlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=order&fnc=execute';
$this->setViewConfigParam('exeorderlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getExeOrderLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'exeorderlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",... | Returns shops order execution link
@return string | [
"Returns",
"shops",
"order",
"execution",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L545-L553 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getOrderConfirmLink | public function getOrderConfirmLink()
{
if (($sValue = $this->getViewConfigParam('orderconfirmlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=order';
$this->setViewConfigParam('orderconfirmlink', $sValue);
}
return $sValue;
} | php | public function getOrderConfirmLink()
{
if (($sValue = $this->getViewConfigParam('orderconfirmlink')) === null) {
$sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=order';
$this->setViewConfigParam('orderconfirmlink', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getOrderConfirmLink",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'orderconfirmlink'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"("... | Returns shops order confirmation link
@return string | [
"Returns",
"shops",
"order",
"confirmation",
"link"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L560-L568 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getResourceUrl | public function getResourceUrl($sFile = null)
{
if ($sFile) {
$sValue = $this->getConfig()->getResourceUrl($sFile, $this->isAdmin());
} elseif (($sValue = $this->getViewConfigParam('basetpldir')) === null) {
$sValue = $this->getConfig()->getResourceUrl('', $this->isAdmin());
$this->setViewConfigParam('basetpldir', $sValue);
}
return $sValue;
} | php | public function getResourceUrl($sFile = null)
{
if ($sFile) {
$sValue = $this->getConfig()->getResourceUrl($sFile, $this->isAdmin());
} elseif (($sValue = $this->getViewConfigParam('basetpldir')) === null) {
$sValue = $this->getConfig()->getResourceUrl('', $this->isAdmin());
$this->setViewConfigParam('basetpldir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getResourceUrl",
"(",
"$",
"sFile",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"sFile",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"getResourceUrl",
"(",
"$",
"sFile",
",",
"$",
"this",
"->",
"i... | Returns shops resource url
@param string $sFile resource file name
@return string | [
"Returns",
"shops",
"resource",
"url"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L577-L587 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getUrlTemplateDir | public function getUrlTemplateDir()
{
if (($sValue = $this->getViewConfigParam('urltemplatedir')) === null) {
$sValue = $this->getConfig()->getTemplateUrl($this->isAdmin());
$this->setViewConfigParam('urltemplatedir', $sValue);
}
return $sValue;
} | php | public function getUrlTemplateDir()
{
if (($sValue = $this->getViewConfigParam('urltemplatedir')) === null) {
$sValue = $this->getConfig()->getTemplateUrl($this->isAdmin());
$this->setViewConfigParam('urltemplatedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getUrlTemplateDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'urltemplatedir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
... | Returns shops current templates url
@return string | [
"Returns",
"shops",
"current",
"templates",
"url"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L609-L617 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getImageUrl | public function getImageUrl($sFile = null, $bSsl = null)
{
if ($sFile) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl, null, $sFile);
} elseif (($sValue = $this->getViewConfigParam('imagedir')) === null) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl);
$this->setViewConfigParam('imagedir', $sValue);
}
return $sValue;
} | php | public function getImageUrl($sFile = null, $bSsl = null)
{
if ($sFile) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl, null, $sFile);
} elseif (($sValue = $this->getViewConfigParam('imagedir')) === null) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl);
$this->setViewConfigParam('imagedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getImageUrl",
"(",
"$",
"sFile",
"=",
"null",
",",
"$",
"bSsl",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"sFile",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"getImageUrl",
"(",
"$",
"this",
... | Returns image url
@param string $sFile Image file name
@param bool $bSsl Whether to force SSL
@return string | [
"Returns",
"image",
"url"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L627-L637 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getNoSslImageDir | public function getNoSslImageDir()
{
if (($sValue = $this->getViewConfigParam('nossl_imagedir')) === null) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), false);
$this->setViewConfigParam('nossl_imagedir', $sValue);
}
return $sValue;
} | php | public function getNoSslImageDir()
{
if (($sValue = $this->getViewConfigParam('nossl_imagedir')) === null) {
$sValue = $this->getConfig()->getImageUrl($this->isAdmin(), false);
$this->setViewConfigParam('nossl_imagedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getNoSslImageDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'nossl_imagedir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
"... | Returns non ssl image url
@return string | [
"Returns",
"non",
"ssl",
"image",
"url"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L644-L652 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getPictureDir | public function getPictureDir()
{
if (($sValue = $this->getViewConfigParam('picturedir')) === null) {
$sValue = $this->getConfig()->getPictureUrl(null, $this->isAdmin());
$this->setViewConfigParam('picturedir', $sValue);
}
return $sValue;
} | php | public function getPictureDir()
{
if (($sValue = $this->getViewConfigParam('picturedir')) === null) {
$sValue = $this->getConfig()->getPictureUrl(null, $this->isAdmin());
$this->setViewConfigParam('picturedir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getPictureDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'picturedir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"... | Returns url to pictures directory.
@return string | [
"Returns",
"url",
"to",
"pictures",
"directory",
"."
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L659-L667 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getAdminDir | public function getAdminDir()
{
if (($sValue = $this->getViewConfigParam('sAdminDir')) === null) {
$sValue = $this->getConfig()->getConfigParam('sAdminDir');
$this->setViewConfigParam('sAdminDir', $sValue);
}
return $sValue;
} | php | public function getAdminDir()
{
if (($sValue = $this->getViewConfigParam('sAdminDir')) === null) {
$sValue = $this->getConfig()->getConfigParam('sAdminDir');
$this->setViewConfigParam('sAdminDir', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getAdminDir",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'sAdminDir'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->"... | Returns admin path
@return string | [
"Returns",
"admin",
"path"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L674-L682 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getActiveShopId | public function getActiveShopId()
{
if (($sValue = $this->getViewConfigParam('shopid')) === null) {
$sValue = $this->getConfig()->getShopId();
$this->setViewConfigParam('shopid', $sValue);
}
return $sValue;
} | php | public function getActiveShopId()
{
if (($sValue = $this->getViewConfigParam('shopid')) === null) {
$sValue = $this->getConfig()->getShopId();
$this->setViewConfigParam('shopid', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getActiveShopId",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'shopid'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->... | Returns currently open shop id
@return string | [
"Returns",
"currently",
"open",
"shop",
"id"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L689-L697 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getRemoteAddress | public function getRemoteAddress()
{
if (($sValue = $this->getViewConfigParam('ip')) === null) {
$sValue = \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getRemoteAddress();
$this->setViewConfigParam('ip', $sValue);
}
return $sValue;
} | php | public function getRemoteAddress()
{
if (($sValue = $this->getViewConfigParam('ip')) === null) {
$sValue = \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getRemoteAddress();
$this->setViewConfigParam('ip', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getRemoteAddress",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'ip'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Core",
... | Returns visitor ip address
@return string | [
"Returns",
"visitor",
"ip",
"address"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L719-L727 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getPopupIdent | public function getPopupIdent()
{
if (($sValue = $this->getViewConfigParam('popupident')) === null) {
$sValue = md5($this->getConfig()->getShopUrl());
$this->setViewConfigParam('popupident', $sValue);
}
return $sValue;
} | php | public function getPopupIdent()
{
if (($sValue = $this->getViewConfigParam('popupident')) === null) {
$sValue = md5($this->getConfig()->getShopUrl());
$this->setViewConfigParam('popupident', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getPopupIdent",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'popupident'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"md5",
"(",
"$",
"this",
"->",
"getConfig",
... | Returns basket popup identifier
@return string | [
"Returns",
"basket",
"popup",
"identifier"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L734-L742 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getPopupIdentRand | public function getPopupIdentRand()
{
if (($sValue = $this->getViewConfigParam('popupidentrand')) === null) {
$sValue = md5(time());
$this->setViewConfigParam('popupidentrand', $sValue);
}
return $sValue;
} | php | public function getPopupIdentRand()
{
if (($sValue = $this->getViewConfigParam('popupidentrand')) === null) {
$sValue = md5(time());
$this->setViewConfigParam('popupidentrand', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getPopupIdentRand",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'popupidentrand'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"md5",
"(",
"time",
"(",
")",
")",
... | Returns random basket popup identifier
@return string | [
"Returns",
"random",
"basket",
"popup",
"identifier"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L749-L757 | train |
OXID-eSales/oxideshop_ce | source/Core/ViewConfig.php | ViewConfig.getArtPerPageForm | public function getArtPerPageForm()
{
if (($sValue = $this->getViewConfigParam('artperpageform')) === null) {
$sValue = $this->getConfig()->getShopCurrentUrl();
$this->setViewConfigParam('artperpageform', $sValue);
}
return $sValue;
} | php | public function getArtPerPageForm()
{
if (($sValue = $this->getViewConfigParam('artperpageform')) === null) {
$sValue = $this->getConfig()->getShopCurrentUrl();
$this->setViewConfigParam('artperpageform', $sValue);
}
return $sValue;
} | [
"public",
"function",
"getArtPerPageForm",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getViewConfigParam",
"(",
"'artperpageform'",
")",
")",
"===",
"null",
")",
"{",
"$",
"sValue",
"=",
"$",
"this",
"->",
"getConfig",
"(",
... | Returns list view paging url
@return string | [
"Returns",
"list",
"view",
"paging",
"url"
] | acd72f4a7c5c7340d70b191e081e4a24b74887cc | https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/ViewConfig.php#L764-L772 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.