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/Core/Config.php
Config.getShopConfVar
public function getShopConfVar($varName, $shopId = null, $module = '') { if (!$shopId) { $shopId = $this->getShopId(); } if ($shopId == $this->getShopId() && (!$module || $module == Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sTheme'))) { $varValue = $this->getConfigParam($varName); if ($varValue !== null) { return $varValue; } } $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC); $query = "select oxvartype, " . $this->getDecodeValueQuery() . " as oxvarvalue from oxconfig where oxshopid = '{$shopId}' and oxmodule = '{$module}' and oxvarname = " . $db->quote($varName); $rs = $db->select($query); if ($rs != false && $rs->count() > 0) { return $this->decodeValue($rs->fields['oxvartype'], $rs->fields['oxvarvalue']); } }
php
public function getShopConfVar($varName, $shopId = null, $module = '') { if (!$shopId) { $shopId = $this->getShopId(); } if ($shopId == $this->getShopId() && (!$module || $module == Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sTheme'))) { $varValue = $this->getConfigParam($varName); if ($varValue !== null) { return $varValue; } } $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC); $query = "select oxvartype, " . $this->getDecodeValueQuery() . " as oxvarvalue from oxconfig where oxshopid = '{$shopId}' and oxmodule = '{$module}' and oxvarname = " . $db->quote($varName); $rs = $db->select($query); if ($rs != false && $rs->count() > 0) { return $this->decodeValue($rs->fields['oxvartype'], $rs->fields['oxvarvalue']); } }
[ "public", "function", "getShopConfVar", "(", "$", "varName", ",", "$", "shopId", "=", "null", ",", "$", "module", "=", "''", ")", "{", "if", "(", "!", "$", "shopId", ")", "{", "$", "shopId", "=", "$", "this", "->", "getShopId", "(", ")", ";", "}"...
Retrieves shop configuration parameters from DB. @param string $varName Variable name @param string $shopId Shop ID @param string $module module identifier @return object - raw configuration value in DB
[ "Retrieves", "shop", "configuration", "parameters", "from", "DB", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L1856-L1877
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.decodeValue
public function decodeValue($type, $mOrigValue) { $value = $mOrigValue; switch ($type) { case 'arr': case 'aarr': $value = unserialize($mOrigValue); break; case 'bool': $value = ($mOrigValue == 'true' || $mOrigValue == '1'); break; } return $value; }
php
public function decodeValue($type, $mOrigValue) { $value = $mOrigValue; switch ($type) { case 'arr': case 'aarr': $value = unserialize($mOrigValue); break; case 'bool': $value = ($mOrigValue == 'true' || $mOrigValue == '1'); break; } return $value; }
[ "public", "function", "decodeValue", "(", "$", "type", ",", "$", "mOrigValue", ")", "{", "$", "value", "=", "$", "mOrigValue", ";", "switch", "(", "$", "type", ")", "{", "case", "'arr'", ":", "case", "'aarr'", ":", "$", "value", "=", "unserialize", "...
Decodes and returns database value @param string $type parameter type @param mixed $mOrigValue parameter db value @return mixed
[ "Decodes", "and", "returns", "database", "value" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L1887-L1901
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.isProductiveMode
public function isProductiveMode() { $productive = $this->getConfigParam('blProductive'); if (!isset($productive)) { $query = 'select oxproductive from oxshops where oxid = "' . $this->getShopId() . '"'; $productive = ( bool ) \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($query); $this->setConfigParam('blProductive', $productive); } return $productive; }
php
public function isProductiveMode() { $productive = $this->getConfigParam('blProductive'); if (!isset($productive)) { $query = 'select oxproductive from oxshops where oxid = "' . $this->getShopId() . '"'; $productive = ( bool ) \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getOne($query); $this->setConfigParam('blProductive', $productive); } return $productive; }
[ "public", "function", "isProductiveMode", "(", ")", "{", "$", "productive", "=", "$", "this", "->", "getConfigParam", "(", "'blProductive'", ")", ";", "if", "(", "!", "isset", "(", "$", "productive", ")", ")", "{", "$", "query", "=", "'select oxproductive ...
Returns true if current active shop is in productive mode or false if not @return bool
[ "Returns", "true", "if", "current", "active", "shop", "is", "in", "productive", "mode", "or", "false", "if", "not" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L1920-L1930
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.getActiveShop
public function getActiveShop() { if ($this->_oActShop && $this->_iShopId == $this->_oActShop->getId() && $this->_oActShop->getLanguage() == Registry::getLang()->getBaseLanguage() ) { return $this->_oActShop; } $this->_oActShop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class); $this->_oActShop->load($this->getShopId()); return $this->_oActShop; }
php
public function getActiveShop() { if ($this->_oActShop && $this->_iShopId == $this->_oActShop->getId() && $this->_oActShop->getLanguage() == Registry::getLang()->getBaseLanguage() ) { return $this->_oActShop; } $this->_oActShop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class); $this->_oActShop->load($this->getShopId()); return $this->_oActShop; }
[ "public", "function", "getActiveShop", "(", ")", "{", "if", "(", "$", "this", "->", "_oActShop", "&&", "$", "this", "->", "_iShopId", "==", "$", "this", "->", "_oActShop", "->", "getId", "(", ")", "&&", "$", "this", "->", "_oActShop", "->", "getLanguag...
Loads and returns active shop object @return Shop
[ "Loads", "and", "returns", "active", "shop", "object" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L1947-L1959
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.getActiveView
public function getActiveView() { if (count($this->_aActiveViews)) { $actView = end($this->_aActiveViews); } if (!isset($actView) || $actView == null) { $actView = oxNew(\OxidEsales\Eshop\Application\Controller\FrontendController::class); $this->_aActiveViews[] = $actView; } return $actView; }
php
public function getActiveView() { if (count($this->_aActiveViews)) { $actView = end($this->_aActiveViews); } if (!isset($actView) || $actView == null) { $actView = oxNew(\OxidEsales\Eshop\Application\Controller\FrontendController::class); $this->_aActiveViews[] = $actView; } return $actView; }
[ "public", "function", "getActiveView", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "_aActiveViews", ")", ")", "{", "$", "actView", "=", "end", "(", "$", "this", "->", "_aActiveViews", ")", ";", "}", "if", "(", "!", "isset", "(", "$",...
Returns active view object. If this object was not defined - returns oxubase object @return FrontendController
[ "Returns", "active", "view", "object", ".", "If", "this", "object", "was", "not", "defined", "-", "returns", "oxubase", "object" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L1966-L1977
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.getActiveViewsIds
public function getActiveViewsIds() { $ids = []; if (is_array($this->getActiveViewsList())) { foreach ($this->getActiveViewsList() as $view) { $ids[] = $view->getClassKey(); } } return $ids; }
php
public function getActiveViewsIds() { $ids = []; if (is_array($this->getActiveViewsList())) { foreach ($this->getActiveViewsList() as $view) { $ids[] = $view->getClassKey(); } } return $ids; }
[ "public", "function", "getActiveViewsIds", "(", ")", "{", "$", "ids", "=", "[", "]", ";", "if", "(", "is_array", "(", "$", "this", "->", "getActiveViewsList", "(", ")", ")", ")", "{", "foreach", "(", "$", "this", "->", "getActiveViewsList", "(", ")", ...
Get active views class id list @return array
[ "Get", "active", "views", "class", "id", "list" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L2058-L2069
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.getMallShopUrl
public function getMallShopUrl($ssl = false) { $configParameter = $ssl ? 'sMallSSLShopURL' : 'sMallShopURL'; $mallShopUrl = $this->getConfigParam($configParameter); if ($mallShopUrl) { return Registry::getUtils()->checkUrlEndingSlash($mallShopUrl); } }
php
public function getMallShopUrl($ssl = false) { $configParameter = $ssl ? 'sMallSSLShopURL' : 'sMallShopURL'; $mallShopUrl = $this->getConfigParam($configParameter); if ($mallShopUrl) { return Registry::getUtils()->checkUrlEndingSlash($mallShopUrl); } }
[ "public", "function", "getMallShopUrl", "(", "$", "ssl", "=", "false", ")", "{", "$", "configParameter", "=", "$", "ssl", "?", "'sMallSSLShopURL'", ":", "'sMallShopURL'", ";", "$", "mallShopUrl", "=", "$", "this", "->", "getConfigParam", "(", "$", "configPar...
Function returns mall shop url. @param bool $ssl @return null|string
[ "Function", "returns", "mall", "shop", "url", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L2183-L2190
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config._handleDbConnectionException
protected function _handleDbConnectionException(\OxidEsales\Eshop\Core\Exception\DatabaseException $exception) { $exceptionHandler = $this->getExceptionHandler(); $exceptionHandler->handleDatabaseException($exception); }
php
protected function _handleDbConnectionException(\OxidEsales\Eshop\Core\Exception\DatabaseException $exception) { $exceptionHandler = $this->getExceptionHandler(); $exceptionHandler->handleDatabaseException($exception); }
[ "protected", "function", "_handleDbConnectionException", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Exception", "\\", "DatabaseException", "$", "exception", ")", "{", "$", "exceptionHandler", "=", "$", "this", "->", "getExceptionHandler", "(", ")...
Handle database exception. At this point everything has crashed already and not much of shop business logic is left to call. So just go straight and call the ExceptionHandler. @param \OxidEsales\Eshop\Core\Exception\DatabaseException $exception
[ "Handle", "database", "exception", ".", "At", "this", "point", "everything", "has", "crashed", "already", "and", "not", "much", "of", "shop", "business", "logic", "is", "left", "to", "call", ".", "So", "just", "go", "straight", "and", "call", "the", "Excep...
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L2199-L2203
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config._handleCookieException
protected function _handleCookieException($ex) { $this->_processSeoCall(); //starting up the session $this->getSession()->start(); // redirect to start page and display the error Registry::getUtilsView()->addErrorToDisplay($ex); Registry::getUtils()->redirect($this->getShopHomeUrl() . 'cl=start', true, 302); }
php
protected function _handleCookieException($ex) { $this->_processSeoCall(); //starting up the session $this->getSession()->start(); // redirect to start page and display the error Registry::getUtilsView()->addErrorToDisplay($ex); Registry::getUtils()->redirect($this->getShopHomeUrl() . 'cl=start', true, 302); }
[ "protected", "function", "_handleCookieException", "(", "$", "ex", ")", "{", "$", "this", "->", "_processSeoCall", "(", ")", ";", "//starting up the session", "$", "this", "->", "getSession", "(", ")", "->", "start", "(", ")", ";", "// redirect to start page and...
Redirect to start page and display the error @param \OxidEsales\Eshop\Core\Exception\StandardException $ex message to show on exit
[ "Redirect", "to", "start", "page", "and", "display", "the", "error" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L2210-L2220
train
OXID-eSales/oxideshop_ce
source/Core/Config.php
Config.saveSystemConfigParameter
public function saveSystemConfigParameter($parameterType, $parameterName, $parameterValue) { $this->saveShopConfVar($parameterType, $parameterName, $parameterValue, $this->getBaseShopId()); }
php
public function saveSystemConfigParameter($parameterType, $parameterName, $parameterValue) { $this->saveShopConfVar($parameterType, $parameterName, $parameterValue, $this->getBaseShopId()); }
[ "public", "function", "saveSystemConfigParameter", "(", "$", "parameterType", ",", "$", "parameterName", ",", "$", "parameterValue", ")", "{", "$", "this", "->", "saveShopConfVar", "(", "$", "parameterType", ",", "$", "parameterName", ",", "$", "parameterValue", ...
Save system configuration parameters, which is the same for sub-shops. @param string $parameterType Type @param string $parameterName Name @param mixed $parameterValue Value (can be string, integer or array)
[ "Save", "system", "configuration", "parameters", "which", "is", "the", "same", "for", "sub", "-", "shops", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Config.php#L2229-L2232
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/OrderOverview.php
OrderOverview.makeValidFileName
public function makeValidFileName($sFilename) { $sFilename = preg_replace('/[\s]+/', '_', $sFilename); $sFilename = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $sFilename); return str_replace(' ', '_', $sFilename); }
php
public function makeValidFileName($sFilename) { $sFilename = preg_replace('/[\s]+/', '_', $sFilename); $sFilename = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $sFilename); return str_replace(' ', '_', $sFilename); }
[ "public", "function", "makeValidFileName", "(", "$", "sFilename", ")", "{", "$", "sFilename", "=", "preg_replace", "(", "'/[\\s]+/'", ",", "'_'", ",", "$", "sFilename", ")", ";", "$", "sFilename", "=", "preg_replace", "(", "'/[^a-zA-Z0-9_\\.-]/'", ",", "''", ...
Gets proper file name @param string $sFilename file name @return string
[ "Gets", "proper", "file", "name" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/OrderOverview.php#L99-L105
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/OrderOverview.php
OrderOverview.canResetShippingDate
public function canResetShippingDate() { $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class); $blCan = false; if ($oOrder->load($this->getEditObjectId())) { $blCan = $oOrder->oxorder__oxstorno->value == "0" && !($oOrder->oxorder__oxsenddate->value == "0000-00-00 00:00:00" || $oOrder->oxorder__oxsenddate->value == "-"); } return $blCan; }
php
public function canResetShippingDate() { $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class); $blCan = false; if ($oOrder->load($this->getEditObjectId())) { $blCan = $oOrder->oxorder__oxstorno->value == "0" && !($oOrder->oxorder__oxsenddate->value == "0000-00-00 00:00:00" || $oOrder->oxorder__oxsenddate->value == "-"); } return $blCan; }
[ "public", "function", "canResetShippingDate", "(", ")", "{", "$", "oOrder", "=", "oxNew", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Order", "::", "class", ")", ";", "$", "blCan", "=", "false", ";", "if", "(", "$...
Get information about shipping status @return bool
[ "Get", "information", "about", "shipping", "status" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/OrderOverview.php#L151-L161
train
OXID-eSales/oxideshop_ce
source/Application/Model/VariantSelectList.php
VariantSelectList.addVariant
public function addVariant($sName, $sValue, $blDisabled, $blActive) { $sName = trim($sName); //#6053 Allow "0" as a valid value. if (!empty($sName) || $sName === '0') { $sKey = $sValue; // creating new if (!isset($this->_aList[$sKey])) { $this->_aList[$sKey] = oxNew(\OxidEsales\Eshop\Application\Model\Selection::class, $sName, $sValue, $blDisabled, $blActive); } else { // overriding states if ($this->_aList[$sKey]->isDisabled() && !$blDisabled) { $this->_aList[$sKey]->setDisabled($blDisabled); } if (!$this->_aList[$sKey]->isActive() && $blActive) { $this->_aList[$sKey]->setActiveState($blActive); } } // storing active selection if ($this->_aList[$sKey]->isActive()) { $this->_oActiveSelection = $this->_aList[$sKey]; } } }
php
public function addVariant($sName, $sValue, $blDisabled, $blActive) { $sName = trim($sName); //#6053 Allow "0" as a valid value. if (!empty($sName) || $sName === '0') { $sKey = $sValue; // creating new if (!isset($this->_aList[$sKey])) { $this->_aList[$sKey] = oxNew(\OxidEsales\Eshop\Application\Model\Selection::class, $sName, $sValue, $blDisabled, $blActive); } else { // overriding states if ($this->_aList[$sKey]->isDisabled() && !$blDisabled) { $this->_aList[$sKey]->setDisabled($blDisabled); } if (!$this->_aList[$sKey]->isActive() && $blActive) { $this->_aList[$sKey]->setActiveState($blActive); } } // storing active selection if ($this->_aList[$sKey]->isActive()) { $this->_oActiveSelection = $this->_aList[$sKey]; } } }
[ "public", "function", "addVariant", "(", "$", "sName", ",", "$", "sValue", ",", "$", "blDisabled", ",", "$", "blActive", ")", "{", "$", "sName", "=", "trim", "(", "$", "sName", ")", ";", "//#6053 Allow \"0\" as a valid value.", "if", "(", "!", "empty", "...
Adds given variant info to current variant selection list @param string $sName selection name @param string $sValue selection value @param string $blDisabled selection state - disabled/enabled @param string $blActive selection state - active/inactive
[ "Adds", "given", "variant", "info", "to", "current", "variant", "selection", "list" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VariantSelectList.php#L73-L99
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/ActionsList.php
ActionsList._prepareWhereQuery
protected function _prepareWhereQuery($aWhere, $sqlFull) { $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull); $sDisplayType = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('displaytype'); $sTable = getViewName("oxactions"); // searching for empty oxfolder fields if ($sDisplayType) { $sNow = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); switch ($sDisplayType) { case 1: // active $sQ .= " and {$sTable}.oxactivefrom < '{$sNow}' and {$sTable}.oxactiveto > '{$sNow}' "; break; case 2: // upcoming $sQ .= " and {$sTable}.oxactivefrom > '{$sNow}' "; break; case 3: // expired $sQ .= " and {$sTable}.oxactiveto < '{$sNow}' and {$sTable}.oxactiveto != '0000-00-00 00:00:00' "; break; } } return $sQ; }
php
protected function _prepareWhereQuery($aWhere, $sqlFull) { $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull); $sDisplayType = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('displaytype'); $sTable = getViewName("oxactions"); // searching for empty oxfolder fields if ($sDisplayType) { $sNow = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); switch ($sDisplayType) { case 1: // active $sQ .= " and {$sTable}.oxactivefrom < '{$sNow}' and {$sTable}.oxactiveto > '{$sNow}' "; break; case 2: // upcoming $sQ .= " and {$sTable}.oxactivefrom > '{$sNow}' "; break; case 3: // expired $sQ .= " and {$sTable}.oxactiveto < '{$sNow}' and {$sTable}.oxactiveto != '0000-00-00 00:00:00' "; break; } } return $sQ; }
[ "protected", "function", "_prepareWhereQuery", "(", "$", "aWhere", ",", "$", "sqlFull", ")", "{", "$", "sQ", "=", "parent", "::", "_prepareWhereQuery", "(", "$", "aWhere", ",", "$", "sqlFull", ")", ";", "$", "sDisplayType", "=", "(", "int", ")", "\\", ...
Adds active promotion check @param array $aWhere SQL condition array @param string $sqlFull SQL query string @return $sQ
[ "Adds", "active", "promotion", "check" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ActionsList.php#L63-L87
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/CountryList.php
CountryList.getListSorting
public function getListSorting() { $aListSorting = parent::getListSorting(); if (array_keys($aListSorting['oxcountry']) === ['oxactive']) { $aListSorting['oxcountry'][$this->_getSecondSortFieldName()] = 'asc'; } return $aListSorting; }
php
public function getListSorting() { $aListSorting = parent::getListSorting(); if (array_keys($aListSorting['oxcountry']) === ['oxactive']) { $aListSorting['oxcountry'][$this->_getSecondSortFieldName()] = 'asc'; } return $aListSorting; }
[ "public", "function", "getListSorting", "(", ")", "{", "$", "aListSorting", "=", "parent", "::", "getListSorting", "(", ")", ";", "if", "(", "array_keys", "(", "$", "aListSorting", "[", "'oxcountry'", "]", ")", "===", "[", "'oxactive'", "]", ")", "{", "$...
Returns sorting fields array. We extend this method for getting a second order by, which will give us not the undefined order behind the "active" countries. @return array
[ "Returns", "sorting", "fields", "array", ".", "We", "extend", "this", "method", "for", "getting", "a", "second", "order", "by", "which", "will", "give", "us", "not", "the", "undefined", "order", "behind", "the", "active", "countries", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/CountryList.php#L61-L70
train
OXID-eSales/oxideshop_ce
source/Core/Encryptor.php
Encryptor.encrypt
public function encrypt($string, $key) { $string = "ox{$string}id"; $key = $this->_formKey($key, $string); $string = $string ^ $key; $string = base64_encode($string); $string = str_replace("=", "!", $string); return "ox_$string"; }
php
public function encrypt($string, $key) { $string = "ox{$string}id"; $key = $this->_formKey($key, $string); $string = $string ^ $key; $string = base64_encode($string); $string = str_replace("=", "!", $string); return "ox_$string"; }
[ "public", "function", "encrypt", "(", "$", "string", ",", "$", "key", ")", "{", "$", "string", "=", "\"ox{$string}id\"", ";", "$", "key", "=", "$", "this", "->", "_formKey", "(", "$", "key", ",", "$", "string", ")", ";", "$", "string", "=", "$", ...
Encrypts string with given key. @param string $string @param string $key @return string
[ "Encrypts", "string", "with", "given", "key", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Encryptor.php#L22-L33
train
OXID-eSales/oxideshop_ce
source/Core/Encryptor.php
Encryptor._formKey
protected function _formKey($key, $string) { $key = '_' . $key; $keyLength = (strlen($string) / strlen($key)) + 5; return str_repeat($key, $keyLength); }
php
protected function _formKey($key, $string) { $key = '_' . $key; $keyLength = (strlen($string) / strlen($key)) + 5; return str_repeat($key, $keyLength); }
[ "protected", "function", "_formKey", "(", "$", "key", ",", "$", "string", ")", "{", "$", "key", "=", "'_'", ".", "$", "key", ";", "$", "keyLength", "=", "(", "strlen", "(", "$", "string", ")", "/", "strlen", "(", "$", "key", ")", ")", "+", "5",...
Forms key for use in encoding. @param string $key @param string $string @return string
[ "Forms", "key", "for", "use", "in", "encoding", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Encryptor.php#L43-L49
train
OXID-eSales/oxideshop_ce
source/Application/Model/NewsList.php
NewsList.loadNews
public function loadNews($iFrom = 0, $iLimit = 10) { if ($iLimit) { $this->setSqlLimit($iFrom, $iLimit); } $sNewsViewName = getViewName('oxnews'); $oBaseObject = $this->getBaseObject(); $sSelectFields = $oBaseObject->getSelectFields(); if ($oUser = $this->getUser()) { // performance - only join if user is logged in $sSelect = "select $sSelectFields from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where "; $sSelect .= "oxobject2group.oxgroupsid in ( select oxgroupsid from oxobject2group where oxobjectid='" . $oUser->getId() . "' ) or "; $sSelect .= "( oxobject2group.oxgroupsid is null ) "; } else { $sSelect = "select $sSelectFields, oxobject2group.oxgroupsid from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where oxobject2group.oxgroupsid is null "; } $sSelect .= " and " . $oBaseObject->getSqlActiveSnippet(); $sSelect .= " and $sNewsViewName.oxshortdesc <> '' "; $sSelect .= " group by $sNewsViewName.oxid order by $sNewsViewName.oxdate desc "; $this->selectString($sSelect); }
php
public function loadNews($iFrom = 0, $iLimit = 10) { if ($iLimit) { $this->setSqlLimit($iFrom, $iLimit); } $sNewsViewName = getViewName('oxnews'); $oBaseObject = $this->getBaseObject(); $sSelectFields = $oBaseObject->getSelectFields(); if ($oUser = $this->getUser()) { // performance - only join if user is logged in $sSelect = "select $sSelectFields from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where "; $sSelect .= "oxobject2group.oxgroupsid in ( select oxgroupsid from oxobject2group where oxobjectid='" . $oUser->getId() . "' ) or "; $sSelect .= "( oxobject2group.oxgroupsid is null ) "; } else { $sSelect = "select $sSelectFields, oxobject2group.oxgroupsid from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where oxobject2group.oxgroupsid is null "; } $sSelect .= " and " . $oBaseObject->getSqlActiveSnippet(); $sSelect .= " and $sNewsViewName.oxshortdesc <> '' "; $sSelect .= " group by $sNewsViewName.oxid order by $sNewsViewName.oxdate desc "; $this->selectString($sSelect); }
[ "public", "function", "loadNews", "(", "$", "iFrom", "=", "0", ",", "$", "iLimit", "=", "10", ")", "{", "if", "(", "$", "iLimit", ")", "{", "$", "this", "->", "setSqlLimit", "(", "$", "iFrom", ",", "$", "iLimit", ")", ";", "}", "$", "sNewsViewNam...
Loads news stored in DB, filtered by user groups, returns array, filled with objects, that keeps news data. @param integer $iFrom number from which start selecting @param integer $iLimit Limit of records to fetch from DB(default 0)
[ "Loads", "news", "stored", "in", "DB", "filtered", "by", "user", "groups", "returns", "array", "filled", "with", "objects", "that", "keeps", "news", "data", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/NewsList.php#L40-L66
train
OXID-eSales/oxideshop_ce
source/Application/Model/NewsList.php
NewsList.getCount
public function getCount() { $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sNewsViewName = getViewName('oxnews'); $oBaseObject = $this->getBaseObject(); //$sSelectFields = $oBaseObject->getSelectFields(); if ($oUser = $this->getUser()) { // performance - only join if user is logged in $sSelect = "select COUNT($sNewsViewName.`oxid`) from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where "; $sSelect .= "oxobject2group.oxgroupsid in ( select oxgroupsid from oxobject2group where oxobjectid='" . $oUser->getId() . "' ) or "; $sSelect .= "( oxobject2group.oxgroupsid is null ) "; } else { $sSelect = "select COUNT($sNewsViewName.`oxid`) from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where oxobject2group.oxgroupsid is null "; } $sSelect .= " and " . $oBaseObject->getSqlActiveSnippet(); // loading only if there is some data $iRecCnt = (int) $oDb->getOne($sSelect); return $iRecCnt; }
php
public function getCount() { $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sNewsViewName = getViewName('oxnews'); $oBaseObject = $this->getBaseObject(); //$sSelectFields = $oBaseObject->getSelectFields(); if ($oUser = $this->getUser()) { // performance - only join if user is logged in $sSelect = "select COUNT($sNewsViewName.`oxid`) from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where "; $sSelect .= "oxobject2group.oxgroupsid in ( select oxgroupsid from oxobject2group where oxobjectid='" . $oUser->getId() . "' ) or "; $sSelect .= "( oxobject2group.oxgroupsid is null ) "; } else { $sSelect = "select COUNT($sNewsViewName.`oxid`) from $sNewsViewName "; $sSelect .= "left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where oxobject2group.oxgroupsid is null "; } $sSelect .= " and " . $oBaseObject->getSqlActiveSnippet(); // loading only if there is some data $iRecCnt = (int) $oDb->getOne($sSelect); return $iRecCnt; }
[ "public", "function", "getCount", "(", ")", "{", "$", "oDb", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "DatabaseProvider", "::", "getDb", "(", ")", ";", "$", "sNewsViewName", "=", "getViewName", "(", "'oxnews'", ")", ";", "$", "oBaseObj...
Returns count of all entries. @return integer $iRecCnt
[ "Returns", "count", "of", "all", "entries", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/NewsList.php#L73-L98
train
OXID-eSales/oxideshop_ce
source/Application/Model/NewsList.php
NewsList.getUser
public function getUser() { if ($this->_oUser == null) { $this->_oUser = parent::getUser(); } return $this->_oUser; }
php
public function getUser() { if ($this->_oUser == null) { $this->_oUser = parent::getUser(); } return $this->_oUser; }
[ "public", "function", "getUser", "(", ")", "{", "if", "(", "$", "this", "->", "_oUser", "==", "null", ")", "{", "$", "this", "->", "_oUser", "=", "parent", "::", "getUser", "(", ")", ";", "}", "return", "$", "this", "->", "_oUser", ";", "}" ]
News list user getter @return \OxidEsales\Eshop\Application\Model\User
[ "News", "list", "user", "getter" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/NewsList.php#L115-L122
train
OXID-eSales/oxideshop_ce
source/Application/Controller/RecommendationAddController.php
RecommendationAddController.getRecommLists
public function getRecommLists() { if ($this->_aUserRecommList === null) { $oUser = $this->getUser(); if ($oUser) { $this->_aUserRecommList = $oUser->getUserRecommLists(); } } return $this->_aUserRecommList; }
php
public function getRecommLists() { if ($this->_aUserRecommList === null) { $oUser = $this->getUser(); if ($oUser) { $this->_aUserRecommList = $oUser->getUserRecommLists(); } } return $this->_aUserRecommList; }
[ "public", "function", "getRecommLists", "(", ")", "{", "if", "(", "$", "this", "->", "_aUserRecommList", "===", "null", ")", "{", "$", "oUser", "=", "$", "this", "->", "getUser", "(", ")", ";", "if", "(", "$", "oUser", ")", "{", "$", "this", "->", ...
Returns user recommlists @return array
[ "Returns", "user", "recommlists" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/RecommendationAddController.php#L51-L61
train
OXID-eSales/oxideshop_ce
source/Application/Controller/RecommendationAddController.php
RecommendationAddController.getTitle
public function getTitle() { $oProduct = $this->getProduct(); return $oProduct->oxarticles__oxtitle->value . ' ' . $oProduct->oxarticles__oxvarselect->value; }
php
public function getTitle() { $oProduct = $this->getProduct(); return $oProduct->oxarticles__oxtitle->value . ' ' . $oProduct->oxarticles__oxvarselect->value; }
[ "public", "function", "getTitle", "(", ")", "{", "$", "oProduct", "=", "$", "this", "->", "getProduct", "(", ")", ";", "return", "$", "oProduct", "->", "oxarticles__oxtitle", "->", "value", ".", "' '", ".", "$", "oProduct", "->", "oxarticles__oxvarselect", ...
Returns the title of the product added to the recommendation list. @return string
[ "Returns", "the", "title", "of", "the", "product", "added", "to", "the", "recommendation", "list", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/RecommendationAddController.php#L68-L73
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File._checkArticleFile
protected function _checkArticleFile($aFileInfo) { //checking params if (!isset($aFileInfo['name']) || !isset($aFileInfo['tmp_name'])) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_NOFILE'); } // error uploading file ? if (isset($aFileInfo['error']) && $aFileInfo['error']) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_FILEUPLOADERROR_' . ((int) $aFileInfo['error'])); } }
php
protected function _checkArticleFile($aFileInfo) { //checking params if (!isset($aFileInfo['name']) || !isset($aFileInfo['tmp_name'])) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_NOFILE'); } // error uploading file ? if (isset($aFileInfo['error']) && $aFileInfo['error']) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_FILEUPLOADERROR_' . ((int) $aFileInfo['error'])); } }
[ "protected", "function", "_checkArticleFile", "(", "$", "aFileInfo", ")", "{", "//checking params", "if", "(", "!", "isset", "(", "$", "aFileInfo", "[", "'name'", "]", ")", "||", "!", "isset", "(", "$", "aFileInfo", "[", "'tmp_name'", "]", ")", ")", "{",...
Checks if given file is valid upload file @param array $aFileInfo File info array @throws oxException Throws exception if file wasn't uploaded successfully.
[ "Checks", "if", "given", "file", "is", "valid", "upload", "file" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L115-L126
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File._getBaseDownloadDirPath
protected function _getBaseDownloadDirPath() { $sConfigValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sDownloadsDir'); //Unix full path is set if ($sConfigValue && $sConfigValue[0] == DIRECTORY_SEPARATOR) { return $sConfigValue; } //relative path is set if ($sConfigValue) { $sPath = getShopBasePath() . DIRECTORY_SEPARATOR . $sConfigValue; return $sPath; } //no path is set $sPath = getShopBasePath() . "/out/downloads/"; return $sPath; }
php
protected function _getBaseDownloadDirPath() { $sConfigValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sDownloadsDir'); //Unix full path is set if ($sConfigValue && $sConfigValue[0] == DIRECTORY_SEPARATOR) { return $sConfigValue; } //relative path is set if ($sConfigValue) { $sPath = getShopBasePath() . DIRECTORY_SEPARATOR . $sConfigValue; return $sPath; } //no path is set $sPath = getShopBasePath() . "/out/downloads/"; return $sPath; }
[ "protected", "function", "_getBaseDownloadDirPath", "(", ")", "{", "$", "sConfigValue", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", "->", "getConfigParam", "(", "'sDownloadsDir'", ")", ";", "//Unix full pa...
Return full path of root dir where download files are stored @return string
[ "Return", "full", "path", "of", "root", "dir", "where", "download", "files", "are", "stored" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L133-L153
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.isUnderDownloadFolder
public function isUnderDownloadFolder() { $storageLocation = realpath($this->getStoreLocation()); if ($storageLocation === false) { return false; } $downloadFolder = realpath($this->_getBaseDownloadDirPath()); return strpos($storageLocation, $downloadFolder) !== false; }
php
public function isUnderDownloadFolder() { $storageLocation = realpath($this->getStoreLocation()); if ($storageLocation === false) { return false; } $downloadFolder = realpath($this->_getBaseDownloadDirPath()); return strpos($storageLocation, $downloadFolder) !== false; }
[ "public", "function", "isUnderDownloadFolder", "(", ")", "{", "$", "storageLocation", "=", "realpath", "(", "$", "this", "->", "getStoreLocation", "(", ")", ")", ";", "if", "(", "$", "storageLocation", "===", "false", ")", "{", "return", "false", ";", "}",...
Return true if file is under download folder. Return false if file is above download folder or if file does not exist. @return bool
[ "Return", "true", "if", "file", "is", "under", "download", "folder", ".", "Return", "false", "if", "file", "is", "above", "download", "folder", "or", "if", "file", "does", "not", "exist", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L176-L187
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File._getFileLocation
protected function _getFileLocation() { $this->_sRelativeFilePath = ''; $sFileHash = $this->oxfiles__oxstorehash->value; $sFileName = $this->oxfiles__oxfilename->value; //security check for demo shops if (\OxidEsales\Eshop\Core\Registry::getConfig()->isDemoShop()) { $sFileName = basename($sFileName); } if ($this->isUploaded()) { $this->_sRelativeFilePath = $this->_getHashedFileDir($sFileHash); $this->_sRelativeFilePath .= DIRECTORY_SEPARATOR . $sFileHash; } else { $this->_sRelativeFilePath = DIRECTORY_SEPARATOR . $this->_sManualUploadDir . DIRECTORY_SEPARATOR . $sFileName; } return $this->_sRelativeFilePath; }
php
protected function _getFileLocation() { $this->_sRelativeFilePath = ''; $sFileHash = $this->oxfiles__oxstorehash->value; $sFileName = $this->oxfiles__oxfilename->value; //security check for demo shops if (\OxidEsales\Eshop\Core\Registry::getConfig()->isDemoShop()) { $sFileName = basename($sFileName); } if ($this->isUploaded()) { $this->_sRelativeFilePath = $this->_getHashedFileDir($sFileHash); $this->_sRelativeFilePath .= DIRECTORY_SEPARATOR . $sFileHash; } else { $this->_sRelativeFilePath = DIRECTORY_SEPARATOR . $this->_sManualUploadDir . DIRECTORY_SEPARATOR . $sFileName; } return $this->_sRelativeFilePath; }
[ "protected", "function", "_getFileLocation", "(", ")", "{", "$", "this", "->", "_sRelativeFilePath", "=", "''", ";", "$", "sFileHash", "=", "$", "this", "->", "oxfiles__oxstorehash", "->", "value", ";", "$", "sFileName", "=", "$", "this", "->", "oxfiles__oxf...
Returns relative file path from oxConfig 'sDownloadsDir' variable. @return string
[ "Returns", "relative", "file", "path", "from", "oxConfig", "sDownloadsDir", "variable", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L194-L213
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File._uploadFile
protected function _uploadFile($sSource, $sTarget) { $blDone = move_uploaded_file($sSource, $sTarget); if ($blDone) { $blDone = @chmod($sTarget, 0644); } return $blDone; }
php
protected function _uploadFile($sSource, $sTarget) { $blDone = move_uploaded_file($sSource, $sTarget); if ($blDone) { $blDone = @chmod($sTarget, 0644); } return $blDone; }
[ "protected", "function", "_uploadFile", "(", "$", "sSource", ",", "$", "sTarget", ")", "{", "$", "blDone", "=", "move_uploaded_file", "(", "$", "sSource", ",", "$", "sTarget", ")", ";", "if", "(", "$", "blDone", ")", "{", "$", "blDone", "=", "@", "ch...
Moves file from source to target and changes file mode. Returns true on success. @param string $sSource Source filename @param string $sTarget Target filename @return bool
[ "Moves", "file", "from", "source", "to", "target", "and", "changes", "file", "mode", ".", "Returns", "true", "on", "success", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L258-L267
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.delete
public function delete($sOxId = null) { $sOxId = $sOxId ? $sOxId : $this->getId(); $this->load($sOxId); // if record cannot be delete, abort deletion if ($blDeleted = parent::delete($sOxId)) { $this->_deleteFile(); } return $blDeleted; }
php
public function delete($sOxId = null) { $sOxId = $sOxId ? $sOxId : $this->getId(); $this->load($sOxId); // if record cannot be delete, abort deletion if ($blDeleted = parent::delete($sOxId)) { $this->_deleteFile(); } return $blDeleted; }
[ "public", "function", "delete", "(", "$", "sOxId", "=", "null", ")", "{", "$", "sOxId", "=", "$", "sOxId", "?", "$", "sOxId", ":", "$", "this", "->", "getId", "(", ")", ";", "$", "this", "->", "load", "(", "$", "sOxId", ")", ";", "// if record ca...
Deletes oxFile record from DB, removes orphan files. @param string $sOxId default null @return bool
[ "Deletes", "oxFile", "record", "from", "DB", "removes", "orphan", "files", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L294-L305
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File._deleteFile
protected function _deleteFile() { if (!$this->isUploaded()) { return false; } $sHash = $this->oxfiles__oxstorehash->value; $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $iCount = $oDb->getOne( 'SELECT COUNT(*) FROM `oxfiles` WHERE `OXSTOREHASH` = ' . $oDb->quote($sHash) ); if (!$iCount) { $sPath = $this->getStoreLocation(); unlink($sPath); } }
php
protected function _deleteFile() { if (!$this->isUploaded()) { return false; } $sHash = $this->oxfiles__oxstorehash->value; $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $iCount = $oDb->getOne( 'SELECT COUNT(*) FROM `oxfiles` WHERE `OXSTOREHASH` = ' . $oDb->quote($sHash) ); if (!$iCount) { $sPath = $this->getStoreLocation(); unlink($sPath); } }
[ "protected", "function", "_deleteFile", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isUploaded", "(", ")", ")", "{", "return", "false", ";", "}", "$", "sHash", "=", "$", "this", "->", "oxfiles__oxstorehash", "->", "value", ";", "$", "oDb", "="...
Checks if file is not used for other objects. If not used, unlink the file. @return null|false
[ "Checks", "if", "file", "is", "not", "used", "for", "other", "objects", ".", "If", "not", "used", "unlink", "the", "file", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L313-L327
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.download
public function download() { $oUtils = \OxidEsales\Eshop\Core\Registry::getUtils(); $sFileName = $this->_getFilenameForUrl(); $sFileLocations = $this->getStoreLocation(); if (!$this->exist() || !$this->isUnderDownloadFolder()) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_NOFILE'); } $oUtils->setHeader("Pragma: public"); $oUtils->setHeader("Expires: 0"); $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0, private"); $oUtils->setHeader('Content-Disposition: attachment;filename=' . $sFileName); $oUtils->setHeader("Content-Type: application/octet-stream"); if ($iFileSize = $this->getSize()) { $oUtils->setHeader("Content-Length: " . $iFileSize); } readfile($sFileLocations); $oUtils->showMessageAndExit(null); }
php
public function download() { $oUtils = \OxidEsales\Eshop\Core\Registry::getUtils(); $sFileName = $this->_getFilenameForUrl(); $sFileLocations = $this->getStoreLocation(); if (!$this->exist() || !$this->isUnderDownloadFolder()) { throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_NOFILE'); } $oUtils->setHeader("Pragma: public"); $oUtils->setHeader("Expires: 0"); $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0, private"); $oUtils->setHeader('Content-Disposition: attachment;filename=' . $sFileName); $oUtils->setHeader("Content-Type: application/octet-stream"); if ($iFileSize = $this->getSize()) { $oUtils->setHeader("Content-Length: " . $iFileSize); } readfile($sFileLocations); $oUtils->showMessageAndExit(null); }
[ "public", "function", "download", "(", ")", "{", "$", "oUtils", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getUtils", "(", ")", ";", "$", "sFileName", "=", "$", "this", "->", "_getFilenameForUrl", "(", ")", ";", "$",...
Supplies the downloadable file for client and exits
[ "Supplies", "the", "downloadable", "file", "for", "client", "and", "exits" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L343-L363
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.hasValidDownloads
public function hasValidDownloads() { if ($this->_blHasValidDownloads == null) { $this->_blHasValidDownloads = false; $sNow = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); $sFileId = $this->getId(); $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sSql = "SELECT `oxorderfiles`.`oxid` FROM `oxorderfiles` LEFT JOIN `oxorderarticles` ON `oxorderarticles`.`oxid` = `oxorderfiles`.`oxorderarticleid` LEFT JOIN `oxorder` ON `oxorder`.`oxid` = `oxorderfiles`.`oxorderid` WHERE `oxorderfiles`.`oxfileid` = " . $oDb->quote($sFileId) . " AND ( ! `oxorderfiles`.`oxmaxdownloadcount` OR `oxorderfiles`.`oxmaxdownloadcount` > `oxorderfiles`.`oxdownloadcount`) AND ( `oxorderfiles`.`oxvaliduntil` = '0000-00-00 00:00:00' OR `oxorderfiles`.`oxvaliduntil` > '{$sNow}' ) AND `oxorder`.`oxstorno` = 0 AND `oxorderarticles`.`oxstorno` = 0"; if ($oDb->getOne($sSql)) { $this->_blHasValidDownloads = true; } } return $this->_blHasValidDownloads; }
php
public function hasValidDownloads() { if ($this->_blHasValidDownloads == null) { $this->_blHasValidDownloads = false; $sNow = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); $sFileId = $this->getId(); $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sSql = "SELECT `oxorderfiles`.`oxid` FROM `oxorderfiles` LEFT JOIN `oxorderarticles` ON `oxorderarticles`.`oxid` = `oxorderfiles`.`oxorderarticleid` LEFT JOIN `oxorder` ON `oxorder`.`oxid` = `oxorderfiles`.`oxorderid` WHERE `oxorderfiles`.`oxfileid` = " . $oDb->quote($sFileId) . " AND ( ! `oxorderfiles`.`oxmaxdownloadcount` OR `oxorderfiles`.`oxmaxdownloadcount` > `oxorderfiles`.`oxdownloadcount`) AND ( `oxorderfiles`.`oxvaliduntil` = '0000-00-00 00:00:00' OR `oxorderfiles`.`oxvaliduntil` > '{$sNow}' ) AND `oxorder`.`oxstorno` = 0 AND `oxorderarticles`.`oxstorno` = 0"; if ($oDb->getOne($sSql)) { $this->_blHasValidDownloads = true; } } return $this->_blHasValidDownloads; }
[ "public", "function", "hasValidDownloads", "(", ")", "{", "if", "(", "$", "this", "->", "_blHasValidDownloads", "==", "null", ")", "{", "$", "this", "->", "_blHasValidDownloads", "=", "false", ";", "$", "sNow", "=", "date", "(", "'Y-m-d H:i:s'", ",", "\\",...
Checks if this file has valid ordered downloads @return bool
[ "Checks", "if", "this", "file", "has", "valid", "ordered", "downloads" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L380-L406
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.getMaxDownloadsCount
public function getMaxDownloadsCount() { $iMaxCount = $this->oxfiles__oxmaxdownloads->value; //if value is -1, takes global options if ($iMaxCount < 0) { $iMaxCount = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iMaxDownloadsCount"); } return $iMaxCount; }
php
public function getMaxDownloadsCount() { $iMaxCount = $this->oxfiles__oxmaxdownloads->value; //if value is -1, takes global options if ($iMaxCount < 0) { $iMaxCount = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iMaxDownloadsCount"); } return $iMaxCount; }
[ "public", "function", "getMaxDownloadsCount", "(", ")", "{", "$", "iMaxCount", "=", "$", "this", "->", "oxfiles__oxmaxdownloads", "->", "value", ";", "//if value is -1, takes global options", "if", "(", "$", "iMaxCount", "<", "0", ")", "{", "$", "iMaxCount", "="...
Returns max download count of file @return int
[ "Returns", "max", "download", "count", "of", "file" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L413-L422
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.getMaxUnregisteredDownloadsCount
public function getMaxUnregisteredDownloadsCount() { $iMaxCount = $this->oxfiles__oxmaxunregdownloads->value; //if value is -1, takes global options if ($iMaxCount < 0) { $iMaxCount = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iMaxDownloadsCountUnregistered"); } return $iMaxCount; }
php
public function getMaxUnregisteredDownloadsCount() { $iMaxCount = $this->oxfiles__oxmaxunregdownloads->value; //if value is -1, takes global options if ($iMaxCount < 0) { $iMaxCount = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iMaxDownloadsCountUnregistered"); } return $iMaxCount; }
[ "public", "function", "getMaxUnregisteredDownloadsCount", "(", ")", "{", "$", "iMaxCount", "=", "$", "this", "->", "oxfiles__oxmaxunregdownloads", "->", "value", ";", "//if value is -1, takes global options", "if", "(", "$", "iMaxCount", "<", "0", ")", "{", "$", "...
Returns max download count of file, if user is not registered @return int
[ "Returns", "max", "download", "count", "of", "file", "if", "user", "is", "not", "registered" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L429-L438
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.getLinkExpirationTime
public function getLinkExpirationTime() { $iExpTime = $this->oxfiles__oxlinkexptime->value; //if value is -1, takes global options if ($iExpTime < 0) { $iExpTime = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iLinkExpirationTime"); } return $iExpTime; }
php
public function getLinkExpirationTime() { $iExpTime = $this->oxfiles__oxlinkexptime->value; //if value is -1, takes global options if ($iExpTime < 0) { $iExpTime = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iLinkExpirationTime"); } return $iExpTime; }
[ "public", "function", "getLinkExpirationTime", "(", ")", "{", "$", "iExpTime", "=", "$", "this", "->", "oxfiles__oxlinkexptime", "->", "value", ";", "//if value is -1, takes global options", "if", "(", "$", "iExpTime", "<", "0", ")", "{", "$", "iExpTime", "=", ...
Returns ordered file link expiration time in hours @return int
[ "Returns", "ordered", "file", "link", "expiration", "time", "in", "hours" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L445-L454
train
OXID-eSales/oxideshop_ce
source/Application/Model/File.php
File.getDownloadExpirationTime
public function getDownloadExpirationTime() { $iExpTime = $this->oxfiles__oxdownloadexptime->value; //if value is -1, takes global options if ($iExpTime < 0) { $iExpTime = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iDownloadExpirationTime"); } return $iExpTime; }
php
public function getDownloadExpirationTime() { $iExpTime = $this->oxfiles__oxdownloadexptime->value; //if value is -1, takes global options if ($iExpTime < 0) { $iExpTime = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("iDownloadExpirationTime"); } return $iExpTime; }
[ "public", "function", "getDownloadExpirationTime", "(", ")", "{", "$", "iExpTime", "=", "$", "this", "->", "oxfiles__oxdownloadexptime", "->", "value", ";", "//if value is -1, takes global options", "if", "(", "$", "iExpTime", "<", "0", ")", "{", "$", "iExpTime", ...
Returns download link expiration time in hours, after the first download @return int
[ "Returns", "download", "link", "expiration", "time", "in", "hours", "after", "the", "first", "download" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/File.php#L461-L470
train
OXID-eSales/oxideshop_ce
source/Application/Component/Widget/Review.php
Review.getReviews
public function getReviews() { $oReview = \OxidEsales\Eshop\Core\Registry::getConfig()->getTopActiveView(); return $oReview->getReviews(); }
php
public function getReviews() { $oReview = \OxidEsales\Eshop\Core\Registry::getConfig()->getTopActiveView(); return $oReview->getReviews(); }
[ "public", "function", "getReviews", "(", ")", "{", "$", "oReview", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", "->", "getTopActiveView", "(", ")", ";", "return", "$", "oReview", "->", "getReviews", ...
Template variable getter. Returns active object's reviews from parent class @return array
[ "Template", "variable", "getter", ".", "Returns", "active", "object", "s", "reviews", "from", "parent", "class" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Component/Widget/Review.php#L110-L115
train
OXID-eSales/oxideshop_ce
source/Application/Model/VatSelector.php
VatSelector.getUserVat
public function getUserVat(\OxidEsales\Eshop\Application\Model\User $oUser, $blCacheReset = false) { $cacheId = $oUser->getId() . '_' . $oUser->oxuser__oxcountryid->value; if (!$blCacheReset) { if (array_key_exists($cacheId, self::$_aUserVatCache) && self::$_aUserVatCache[$cacheId] !== null ) { return self::$_aUserVatCache[$cacheId]; } } $ret = false; $sCountryId = $this->_getVatCountry($oUser); if ($sCountryId) { $oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class); if (!$oCountry->load($sCountryId)) { throw oxNew(\OxidEsales\Eshop\Core\Exception\ObjectException::class); } if ($oCountry->isForeignCountry()) { $ret = $this->_getForeignCountryUserVat($oUser, $oCountry); } } self::$_aUserVatCache[$cacheId] = $ret; return $ret; }
php
public function getUserVat(\OxidEsales\Eshop\Application\Model\User $oUser, $blCacheReset = false) { $cacheId = $oUser->getId() . '_' . $oUser->oxuser__oxcountryid->value; if (!$blCacheReset) { if (array_key_exists($cacheId, self::$_aUserVatCache) && self::$_aUserVatCache[$cacheId] !== null ) { return self::$_aUserVatCache[$cacheId]; } } $ret = false; $sCountryId = $this->_getVatCountry($oUser); if ($sCountryId) { $oCountry = oxNew(\OxidEsales\Eshop\Application\Model\Country::class); if (!$oCountry->load($sCountryId)) { throw oxNew(\OxidEsales\Eshop\Core\Exception\ObjectException::class); } if ($oCountry->isForeignCountry()) { $ret = $this->_getForeignCountryUserVat($oUser, $oCountry); } } self::$_aUserVatCache[$cacheId] = $ret; return $ret; }
[ "public", "function", "getUserVat", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "User", "$", "oUser", ",", "$", "blCacheReset", "=", "false", ")", "{", "$", "cacheId", "=", "$", "oUser", "->", "getId", "(", ")", "....
get VAT for user, can NOT be null @param \OxidEsales\Eshop\Application\Model\User $oUser given user object @param bool $blCacheReset reset cache @throws oxObjectException if wrong country @return double | false
[ "get", "VAT", "for", "user", "can", "NOT", "be", "null" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VatSelector.php#L41-L70
train
OXID-eSales/oxideshop_ce
source/Application/Model/VatSelector.php
VatSelector._getForeignCountryUserVat
protected function _getForeignCountryUserVat(\OxidEsales\Eshop\Application\Model\User $oUser, \OxidEsales\Eshop\Application\Model\Country $oCountry) { if ($oCountry->isInEU()) { if ($oUser->oxuser__oxustid->value) { return 0; } return false; } return 0; }
php
protected function _getForeignCountryUserVat(\OxidEsales\Eshop\Application\Model\User $oUser, \OxidEsales\Eshop\Application\Model\Country $oCountry) { if ($oCountry->isInEU()) { if ($oUser->oxuser__oxustid->value) { return 0; } return false; } return 0; }
[ "protected", "function", "_getForeignCountryUserVat", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "User", "$", "oUser", ",", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Country", "$", "oCo...
get vat for user of a foreign country @param \OxidEsales\Eshop\Application\Model\User $oUser given user object @param \OxidEsales\Eshop\Application\Model\Country $oCountry given country object @return mixed
[ "get", "vat", "for", "user", "of", "a", "foreign", "country" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VatSelector.php#L80-L91
train
OXID-eSales/oxideshop_ce
source/Application/Model/VatSelector.php
VatSelector._getVatForArticleCategory
protected function _getVatForArticleCategory(\OxidEsales\Eshop\Application\Model\Article $oArticle) { $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sCatT = getViewName('oxcategories'); if ($this->_blCatVatSet === null) { $sSelect = "SELECT oxid FROM $sCatT WHERE oxvat IS NOT NULL LIMIT 1"; //no category specific vats in shop? //then for performance reasons we just return false $this->_blCatVatSet = (bool) $oDb->getOne($sSelect); } if (!$this->_blCatVatSet) { return false; } $sO2C = getViewName('oxobject2category'); $sSql = "SELECT c.oxvat FROM $sCatT AS c, $sO2C AS o2c WHERE c.oxid=o2c.oxcatnid AND o2c.oxobjectid = " . $oDb->quote($oArticle->getId()) . " AND c.oxvat IS NOT NULL ORDER BY o2c.oxtime "; $fVat = $oDb->getOne($sSql); if ($fVat !== false && $fVat !== null) { return $fVat; } return false; }
php
protected function _getVatForArticleCategory(\OxidEsales\Eshop\Application\Model\Article $oArticle) { $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(); $sCatT = getViewName('oxcategories'); if ($this->_blCatVatSet === null) { $sSelect = "SELECT oxid FROM $sCatT WHERE oxvat IS NOT NULL LIMIT 1"; //no category specific vats in shop? //then for performance reasons we just return false $this->_blCatVatSet = (bool) $oDb->getOne($sSelect); } if (!$this->_blCatVatSet) { return false; } $sO2C = getViewName('oxobject2category'); $sSql = "SELECT c.oxvat FROM $sCatT AS c, $sO2C AS o2c WHERE c.oxid=o2c.oxcatnid AND o2c.oxobjectid = " . $oDb->quote($oArticle->getId()) . " AND c.oxvat IS NOT NULL ORDER BY o2c.oxtime "; $fVat = $oDb->getOne($sSql); if ($fVat !== false && $fVat !== null) { return $fVat; } return false; }
[ "protected", "function", "_getVatForArticleCategory", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Article", "$", "oArticle", ")", "{", "$", "oDb", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "DatabaseProvi...
return Vat value for category type assignment only @param \OxidEsales\Eshop\Application\Model\Article $oArticle given article @return float | false
[ "return", "Vat", "value", "for", "category", "type", "assignment", "only" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VatSelector.php#L100-L131
train
OXID-eSales/oxideshop_ce
source/Application/Model/VatSelector.php
VatSelector.getArticleVat
public function getArticleVat(\OxidEsales\Eshop\Application\Model\Article $oArticle) { startProfile("_assignPriceInternal"); // article has its own VAT ? if (($dArticleVat = $oArticle->getCustomVAT()) !== null) { stopProfile("_assignPriceInternal"); return $dArticleVat; } if (($dArticleVat = $this->_getVatForArticleCategory($oArticle)) !== false) { stopProfile("_assignPriceInternal"); return $dArticleVat; } stopProfile("_assignPriceInternal"); return \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('dDefaultVAT'); }
php
public function getArticleVat(\OxidEsales\Eshop\Application\Model\Article $oArticle) { startProfile("_assignPriceInternal"); // article has its own VAT ? if (($dArticleVat = $oArticle->getCustomVAT()) !== null) { stopProfile("_assignPriceInternal"); return $dArticleVat; } if (($dArticleVat = $this->_getVatForArticleCategory($oArticle)) !== false) { stopProfile("_assignPriceInternal"); return $dArticleVat; } stopProfile("_assignPriceInternal"); return \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('dDefaultVAT'); }
[ "public", "function", "getArticleVat", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Article", "$", "oArticle", ")", "{", "startProfile", "(", "\"_assignPriceInternal\"", ")", ";", "// article has its own VAT ?", "if", "(", "("...
get VAT for given article, can NOT be null @param \OxidEsales\Eshop\Application\Model\Article $oArticle given article @return double
[ "get", "VAT", "for", "given", "article", "can", "NOT", "be", "null" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VatSelector.php#L140-L159
train
OXID-eSales/oxideshop_ce
source/Application/Model/VatSelector.php
VatSelector.getArticleUserVat
public function getArticleUserVat(\OxidEsales\Eshop\Application\Model\Article $oArticle) { if (($oUser = $oArticle->getArticleUser())) { return $this->getUserVat($oUser); } return false; }
php
public function getArticleUserVat(\OxidEsales\Eshop\Application\Model\Article $oArticle) { if (($oUser = $oArticle->getArticleUser())) { return $this->getUserVat($oUser); } return false; }
[ "public", "function", "getArticleUserVat", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Article", "$", "oArticle", ")", "{", "if", "(", "(", "$", "oUser", "=", "$", "oArticle", "->", "getArticleUser", "(", ")", ")", ...
get article user vat @param \OxidEsales\Eshop\Application\Model\Article $oArticle article object @return double | false
[ "get", "article", "user", "vat" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/VatSelector.php#L183-L190
train
OXID-eSales/oxideshop_ce
source/Core/FileCache.php
FileCache.getFromCache
public function getFromCache($key) { $fileName = $this->getCacheFilePath($key); $value = null; if (is_readable($fileName)) { $value = file_get_contents($fileName); if ($value == serialize(false)) { return false; } $value = unserialize($value); if ($value === false) { $value = null; } } return $value; }
php
public function getFromCache($key) { $fileName = $this->getCacheFilePath($key); $value = null; if (is_readable($fileName)) { $value = file_get_contents($fileName); if ($value == serialize(false)) { return false; } $value = unserialize($value); if ($value === false) { $value = null; } } return $value; }
[ "public", "function", "getFromCache", "(", "$", "key", ")", "{", "$", "fileName", "=", "$", "this", "->", "getCacheFilePath", "(", "$", "key", ")", ";", "$", "value", "=", "null", ";", "if", "(", "is_readable", "(", "$", "fileName", ")", ")", "{", ...
Returns cached item value by given key. This method is independent from oxConfig class and does not use database. @param string $key cached item key. @return mixed
[ "Returns", "cached", "item", "value", "by", "given", "key", ".", "This", "method", "is", "independent", "from", "oxConfig", "class", "and", "does", "not", "use", "database", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/FileCache.php#L28-L45
train
OXID-eSales/oxideshop_ce
source/Core/FileCache.php
FileCache.setToCache
public function setToCache($key, $value) { $fileName = $this->getCacheFilePath($key); $cacheDirectory = $this->getCacheDir(); $tmpFile = $cacheDirectory . "/" . basename($fileName) . uniqid('.temp', true) . '.txt'; file_put_contents($tmpFile, serialize($value), LOCK_EX); rename($tmpFile, $fileName); }
php
public function setToCache($key, $value) { $fileName = $this->getCacheFilePath($key); $cacheDirectory = $this->getCacheDir(); $tmpFile = $cacheDirectory . "/" . basename($fileName) . uniqid('.temp', true) . '.txt'; file_put_contents($tmpFile, serialize($value), LOCK_EX); rename($tmpFile, $fileName); }
[ "public", "function", "setToCache", "(", "$", "key", ",", "$", "value", ")", "{", "$", "fileName", "=", "$", "this", "->", "getCacheFilePath", "(", "$", "key", ")", ";", "$", "cacheDirectory", "=", "$", "this", "->", "getCacheDir", "(", ")", ";", "$"...
Caches item value by given key. @param string $key cached item key. @param mixed $value
[ "Caches", "item", "value", "by", "given", "key", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/FileCache.php#L53-L62
train
OXID-eSales/oxideshop_ce
source/Core/FileCache.php
FileCache.clearCache
public static function clearCache() { $tempDirectory = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar("sCompileDir"); $mask = $tempDirectory . "/" . self::CACHE_FILE_PREFIX . ".*.txt"; $files = glob($mask); if (is_array($files)) { foreach ($files as $file) { if (is_file($file)) { @unlink($file); } } } }
php
public static function clearCache() { $tempDirectory = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar("sCompileDir"); $mask = $tempDirectory . "/" . self::CACHE_FILE_PREFIX . ".*.txt"; $files = glob($mask); if (is_array($files)) { foreach ($files as $file) { if (is_file($file)) { @unlink($file); } } } }
[ "public", "static", "function", "clearCache", "(", ")", "{", "$", "tempDirectory", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "get", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "ConfigFile", "::", "class",...
Clears all cache by deleting cached files.
[ "Clears", "all", "cache", "by", "deleting", "cached", "files", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/FileCache.php#L67-L79
train
OXID-eSales/oxideshop_ce
source/Core/FileCache.php
FileCache.getCacheDir
protected function getCacheDir() { return \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar("sCompileDir"); }
php
protected function getCacheDir() { return \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar("sCompileDir"); }
[ "protected", "function", "getCacheDir", "(", ")", "{", "return", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "get", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "ConfigFile", "::", "class", ")", "->", "getVar", ...
Returns cache directory. @return string
[ "Returns", "cache", "directory", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/FileCache.php#L98-L101
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/NewsText.php
NewsText.save
public function save() { parent::save(); $soxId = $this->getEditObjectId(); $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval"); $oNews = oxNew(\OxidEsales\Eshop\Application\Model\News::class); $iNewsLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newslang"); if (!isset($iNewsLang)) { $iNewsLang = $this->_iEditLang; } if ($soxId != "-1") { $oNews->loadInLang($iNewsLang, $soxId); } else { $aParams['oxnews__oxid'] = null; } // Disable editing for derived items. if ($oNews->isDerived()) { return; } $oNews->setLanguage(0); $oNews->assign($aParams); $oNews->setLanguage($iNewsLang); $oNews->save(); // set oxid if inserted $this->setEditObjectId($oNews->getId()); }
php
public function save() { parent::save(); $soxId = $this->getEditObjectId(); $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval"); $oNews = oxNew(\OxidEsales\Eshop\Application\Model\News::class); $iNewsLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newslang"); if (!isset($iNewsLang)) { $iNewsLang = $this->_iEditLang; } if ($soxId != "-1") { $oNews->loadInLang($iNewsLang, $soxId); } else { $aParams['oxnews__oxid'] = null; } // Disable editing for derived items. if ($oNews->isDerived()) { return; } $oNews->setLanguage(0); $oNews->assign($aParams); $oNews->setLanguage($iNewsLang); $oNews->save(); // set oxid if inserted $this->setEditObjectId($oNews->getId()); }
[ "public", "function", "save", "(", ")", "{", "parent", "::", "save", "(", ")", ";", "$", "soxId", "=", "$", "this", "->", "getEditObjectId", "(", ")", ";", "$", "aParams", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", ...
Saves news text. @return mixed
[ "Saves", "news", "text", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/NewsText.php#L66-L98
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/DiagnosticsMain.php
DiagnosticsMain._runBasicDiagnostics
protected function _runBasicDiagnostics() { $aViewData = []; $oDiagnostics = oxNew(\OxidEsales\Eshop\Application\Model\Diagnostics::class); $oDiagnostics->setShopLink(Registry::getConfig()->getConfigParam('sShopURL')); $oDiagnostics->setEdition(Registry::getConfig()->getFullEdition()); $oDiagnostics->setVersion( oxNew(\OxidEsales\Eshop\Core\ShopVersion::class)->getVersion() ); /** * Shop */ if ($this->getParam('runAnalysis')) { $aViewData['runAnalysis'] = true; $aViewData['aShopDetails'] = $oDiagnostics->getShopDetails(); } /** * Modules */ if ($this->getParam('oxdiag_frm_modules')) { $sModulesDir = \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesDir(); $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class); $aModules = $oModuleList->getModulesFromDir($sModulesDir); $aViewData['oxdiag_frm_modules'] = true; $aViewData['mylist'] = $aModules; } /** * Health */ if ($this->getParam('oxdiag_frm_health')) { $oSysReq = oxNew(\OxidEsales\Eshop\Core\SystemRequirements::class); $aViewData['oxdiag_frm_health'] = true; $aViewData['aInfo'] = $oSysReq->getSystemInfo(); $aViewData['aCollations'] = $oSysReq->checkCollation(); } /** * PHP info * Fetches a hand full of php configuration parameters and collects their values. */ if ($this->getParam('oxdiag_frm_php')) { $aViewData['oxdiag_frm_php'] = true; $aViewData['aPhpConfigparams'] = $oDiagnostics->getPhpSelection(); $aViewData['sPhpDecoder'] = $oDiagnostics->getPhpDecoder(); } /** * Server info */ if ($this->getParam('oxdiag_frm_server')) { $aViewData['isExecAllowed'] = $oDiagnostics->isExecAllowed(); $aViewData['oxdiag_frm_server'] = true; $aViewData['aServerInfo'] = $oDiagnostics->getServerInfo(); } return $aViewData; }
php
protected function _runBasicDiagnostics() { $aViewData = []; $oDiagnostics = oxNew(\OxidEsales\Eshop\Application\Model\Diagnostics::class); $oDiagnostics->setShopLink(Registry::getConfig()->getConfigParam('sShopURL')); $oDiagnostics->setEdition(Registry::getConfig()->getFullEdition()); $oDiagnostics->setVersion( oxNew(\OxidEsales\Eshop\Core\ShopVersion::class)->getVersion() ); /** * Shop */ if ($this->getParam('runAnalysis')) { $aViewData['runAnalysis'] = true; $aViewData['aShopDetails'] = $oDiagnostics->getShopDetails(); } /** * Modules */ if ($this->getParam('oxdiag_frm_modules')) { $sModulesDir = \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesDir(); $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class); $aModules = $oModuleList->getModulesFromDir($sModulesDir); $aViewData['oxdiag_frm_modules'] = true; $aViewData['mylist'] = $aModules; } /** * Health */ if ($this->getParam('oxdiag_frm_health')) { $oSysReq = oxNew(\OxidEsales\Eshop\Core\SystemRequirements::class); $aViewData['oxdiag_frm_health'] = true; $aViewData['aInfo'] = $oSysReq->getSystemInfo(); $aViewData['aCollations'] = $oSysReq->checkCollation(); } /** * PHP info * Fetches a hand full of php configuration parameters and collects their values. */ if ($this->getParam('oxdiag_frm_php')) { $aViewData['oxdiag_frm_php'] = true; $aViewData['aPhpConfigparams'] = $oDiagnostics->getPhpSelection(); $aViewData['sPhpDecoder'] = $oDiagnostics->getPhpDecoder(); } /** * Server info */ if ($this->getParam('oxdiag_frm_server')) { $aViewData['isExecAllowed'] = $oDiagnostics->isExecAllowed(); $aViewData['oxdiag_frm_server'] = true; $aViewData['aServerInfo'] = $oDiagnostics->getServerInfo(); } return $aViewData; }
[ "protected", "function", "_runBasicDiagnostics", "(", ")", "{", "$", "aViewData", "=", "[", "]", ";", "$", "oDiagnostics", "=", "oxNew", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Diagnostics", "::", "class", ")", ";...
Performs main system diagnostic. Shop and module details, database health, php parameters, server information @return array
[ "Performs", "main", "system", "diagnostic", ".", "Shop", "and", "module", "details", "database", "health", "php", "parameters", "server", "information" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/DiagnosticsMain.php#L129-L190
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/DiagnosticsMain.php
DiagnosticsMain.getParam
public function getParam($name) { $request = Registry::get(\OxidEsales\Eshop\Core\Request::class); return $request->getRequestEscapedParameter($name); }
php
public function getParam($name) { $request = Registry::get(\OxidEsales\Eshop\Core\Request::class); return $request->getRequestEscapedParameter($name); }
[ "public", "function", "getParam", "(", "$", "name", ")", "{", "$", "request", "=", "Registry", "::", "get", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Request", "::", "class", ")", ";", "return", "$", "request", "->", "getRequestEscaped...
Request parameter getter @param string $name @return string
[ "Request", "parameter", "getter" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/DiagnosticsMain.php#L232-L237
train
OXID-eSales/oxideshop_ce
source/Core/TableViewNameGenerator.php
TableViewNameGenerator.getViewName
public function getViewName($table, $languageId = null, $shopId = null) { $config = $this->getConfig(); if (!$config->getConfigParam('blSkipViewUsage')) { $language = $this->getLanguage(); $languageId = $languageId !== null ? $languageId : $language->getBaseLanguage(); $shopId = $shopId !== null ? $shopId : $config->getShopId(); $isMultiLang = in_array($table, $language->getMultiLangTables()); $viewSuffix = $this->getViewSuffix($table, $languageId, $shopId, $isMultiLang); if ($viewSuffix || (($languageId == -1 || $shopId == -1) && $isMultiLang)) { return "oxv_{$table}{$viewSuffix}"; } } return $table; }
php
public function getViewName($table, $languageId = null, $shopId = null) { $config = $this->getConfig(); if (!$config->getConfigParam('blSkipViewUsage')) { $language = $this->getLanguage(); $languageId = $languageId !== null ? $languageId : $language->getBaseLanguage(); $shopId = $shopId !== null ? $shopId : $config->getShopId(); $isMultiLang = in_array($table, $language->getMultiLangTables()); $viewSuffix = $this->getViewSuffix($table, $languageId, $shopId, $isMultiLang); if ($viewSuffix || (($languageId == -1 || $shopId == -1) && $isMultiLang)) { return "oxv_{$table}{$viewSuffix}"; } } return $table; }
[ "public", "function", "getViewName", "(", "$", "table", ",", "$", "languageId", "=", "null", ",", "$", "shopId", "=", "null", ")", "{", "$", "config", "=", "$", "this", "->", "getConfig", "(", ")", ";", "if", "(", "!", "$", "config", "->", "getConf...
Return the view name of the given table if a view exists, otherwise the table name itself. Views usage can be disabled with blSkipViewUsage config option in case admin area is not reachable due to broken views, so that they could be regenerated. @param string $table Table name @param int $languageId Language id [optional] @param string $shopId Shop id, otherwise config->getShopId() is used [optional] @return string
[ "Return", "the", "view", "name", "of", "the", "given", "table", "if", "a", "view", "exists", "otherwise", "the", "table", "name", "itself", ".", "Views", "usage", "can", "be", "disabled", "with", "blSkipViewUsage", "config", "option", "in", "case", "admin", ...
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/TableViewNameGenerator.php#L48-L65
train
OXID-eSales/oxideshop_ce
source/Core/TableViewNameGenerator.php
TableViewNameGenerator.getViewSuffix
protected function getViewSuffix($table, $languageId, $shopId, $isMultiLang) { $viewSuffix = ''; if ($languageId != -1 && $isMultiLang) { $languageAbbreviation = $this->getLanguage()->getLanguageAbbr($languageId); $viewSuffix .= "_{$languageAbbreviation}"; } return $viewSuffix; }
php
protected function getViewSuffix($table, $languageId, $shopId, $isMultiLang) { $viewSuffix = ''; if ($languageId != -1 && $isMultiLang) { $languageAbbreviation = $this->getLanguage()->getLanguageAbbr($languageId); $viewSuffix .= "_{$languageAbbreviation}"; } return $viewSuffix; }
[ "protected", "function", "getViewSuffix", "(", "$", "table", ",", "$", "languageId", ",", "$", "shopId", ",", "$", "isMultiLang", ")", "{", "$", "viewSuffix", "=", "''", ";", "if", "(", "$", "languageId", "!=", "-", "1", "&&", "$", "isMultiLang", ")", ...
Generates view suffix. @param string $table @param int $languageId @param int $shopId @param bool $isMultiLang @return string
[ "Generates", "view", "suffix", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/TableViewNameGenerator.php#L77-L86
train
OXID-eSales/oxideshop_ce
source/Core/Exception/StandardException.php
StandardException.getString
public function getString() { $sWarning = ""; if ($this->_blNotCaught) { $sWarning .= "--!--NOT CAUGHT--!--"; } if ($this->_blRenderer) { $sWarning .= "--!--RENDERER--!--"; } $currentTime = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); return $sWarning . __CLASS__ . " (time: " . $currentTime . "): [{$this->code}]: {$this->message} \n Stack Trace: {$this->getTraceAsString()}\n\n"; }
php
public function getString() { $sWarning = ""; if ($this->_blNotCaught) { $sWarning .= "--!--NOT CAUGHT--!--"; } if ($this->_blRenderer) { $sWarning .= "--!--RENDERER--!--"; } $currentTime = date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()); return $sWarning . __CLASS__ . " (time: " . $currentTime . "): [{$this->code}]: {$this->message} \n Stack Trace: {$this->getTraceAsString()}\n\n"; }
[ "public", "function", "getString", "(", ")", "{", "$", "sWarning", "=", "\"\"", ";", "if", "(", "$", "this", "->", "_blNotCaught", ")", "{", "$", "sWarning", ".=", "\"--!--NOT CAUGHT--!--\"", ";", "}", "if", "(", "$", "this", "->", "_blRenderer", ")", ...
Get complete string dump, should be overwritten by excptions extending this exceptions if they introduce new fields @return string
[ "Get", "complete", "string", "dump", "should", "be", "overwritten", "by", "excptions", "extending", "this", "exceptions", "if", "they", "introduce", "new", "fields" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Exception/StandardException.php#L103-L117
train
OXID-eSales/oxideshop_ce
source/Application/Model/News.php
News.assign
public function assign($dbRecord) { parent::assign($dbRecord); // convert date's to international format if ($this->oxnews__oxdate) { $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value)); } }
php
public function assign($dbRecord) { parent::assign($dbRecord); // convert date's to international format if ($this->oxnews__oxdate) { $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value)); } }
[ "public", "function", "assign", "(", "$", "dbRecord", ")", "{", "parent", "::", "assign", "(", "$", "dbRecord", ")", ";", "// convert date's to international format", "if", "(", "$", "this", "->", "oxnews__oxdate", ")", "{", "$", "this", "->", "oxnews__oxdate"...
Assigns object data. @param string $dbRecord database record to be assigned
[ "Assigns", "object", "data", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/News.php#L52-L60
train
OXID-eSales/oxideshop_ce
source/Application/Model/News.php
News._update
protected function _update() { $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value, true)); parent::_update(); }
php
protected function _update() { $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value, true)); parent::_update(); }
[ "protected", "function", "_update", "(", ")", "{", "$", "this", "->", "oxnews__oxdate", "->", "setValue", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getUtilsDate", "(", ")", "->", "formatDBDate", "(", "$", "this", "->", ...
Updates object information in DB.
[ "Updates", "object", "information", "in", "DB", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/News.php#L130-L135
train
OXID-eSales/oxideshop_ce
source/Application/Model/News.php
News._insert
protected function _insert() { if (!$this->oxnews__oxdate || \OxidEsales\Eshop\Core\Registry::getUtilsDate()->isEmptyDate($this->oxnews__oxdate->value)) { // if date field is empty, assigning current date $this->oxnews__oxdate = new \OxidEsales\Eshop\Core\Field(date('Y-m-d')); } else { $this->oxnews__oxdate = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value, true)); } return parent::_insert(); }
php
protected function _insert() { if (!$this->oxnews__oxdate || \OxidEsales\Eshop\Core\Registry::getUtilsDate()->isEmptyDate($this->oxnews__oxdate->value)) { // if date field is empty, assigning current date $this->oxnews__oxdate = new \OxidEsales\Eshop\Core\Field(date('Y-m-d')); } else { $this->oxnews__oxdate = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value, true)); } return parent::_insert(); }
[ "protected", "function", "_insert", "(", ")", "{", "if", "(", "!", "$", "this", "->", "oxnews__oxdate", "||", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getUtilsDate", "(", ")", "->", "isEmptyDate", "(", "$", "this", "->", ...
Inserts object details to DB, returns true on success. @return bool
[ "Inserts", "object", "details", "to", "DB", "returns", "true", "on", "success", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/News.php#L142-L152
train
OXID-eSales/oxideshop_ce
source/Application/Model/News.php
News.getLongDesc
public function getLongDesc() { /** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */ $oUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView(); return $oUtilsView->parseThroughSmarty($this->oxnews__oxlongdesc->getRawValue(), $this->getId() . $this->getLanguage(), null, true); }
php
public function getLongDesc() { /** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */ $oUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView(); return $oUtilsView->parseThroughSmarty($this->oxnews__oxlongdesc->getRawValue(), $this->getId() . $this->getLanguage(), null, true); }
[ "public", "function", "getLongDesc", "(", ")", "{", "/** @var \\OxidEsales\\Eshop\\Core\\UtilsView $oUtilsView */", "$", "oUtilsView", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getUtilsView", "(", ")", ";", "return", "$", "oUtils...
get long description, parsed through smarty @return string
[ "get", "long", "description", "parsed", "through", "smarty" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/News.php#L179-L184
train
OXID-eSales/oxideshop_ce
source/Core/Decryptor.php
Decryptor.decrypt
public function decrypt($string, $key) { $key = $this->_formKey($key, $string); $string = substr($string, 3); $string = str_replace('!', '=', $string); $string = base64_decode($string); $string = $string ^ $key; return substr($string, 2, -2); }
php
public function decrypt($string, $key) { $key = $this->_formKey($key, $string); $string = substr($string, 3); $string = str_replace('!', '=', $string); $string = base64_decode($string); $string = $string ^ $key; return substr($string, 2, -2); }
[ "public", "function", "decrypt", "(", "$", "string", ",", "$", "key", ")", "{", "$", "key", "=", "$", "this", "->", "_formKey", "(", "$", "key", ",", "$", "string", ")", ";", "$", "string", "=", "substr", "(", "$", "string", ",", "3", ")", ";",...
Decrypts string with given key. @param string $string string @param string $key key @return string
[ "Decrypts", "string", "with", "given", "key", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Decryptor.php#L22-L32
train
OXID-eSales/oxideshop_ce
source/Core/Registry.php
Registry.instanceExists
public static function instanceExists($className) { $key = self::getStorageKey($className); return isset(self::$instances[$key]); }
php
public static function instanceExists($className) { $key = self::getStorageKey($className); return isset(self::$instances[$key]); }
[ "public", "static", "function", "instanceExists", "(", "$", "className", ")", "{", "$", "key", "=", "self", "::", "getStorageKey", "(", "$", "className", ")", ";", "return", "isset", "(", "self", "::", "$", "instances", "[", "$", "key", "]", ")", ";", ...
Check if an instance of a given class is set in the registry @param string $className @return bool
[ "Check", "if", "an", "instance", "of", "a", "given", "class", "is", "set", "in", "the", "registry" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Registry.php#L345-L350
train
OXID-eSales/oxideshop_ce
source/Core/Registry.php
Registry.getStorageKey
public static function getStorageKey($className) { $key = $className; if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) { $bcMap = self::getBackwardsCompatibilityClassMap(); $key = isset($bcMap[strtolower($key)]) ? $bcMap[strtolower($key)] : strtolower($key); } return $key; }
php
public static function getStorageKey($className) { $key = $className; if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) { $bcMap = self::getBackwardsCompatibilityClassMap(); $key = isset($bcMap[strtolower($key)]) ? $bcMap[strtolower($key)] : strtolower($key); } return $key; }
[ "public", "static", "function", "getStorageKey", "(", "$", "className", ")", "{", "$", "key", "=", "$", "className", ";", "if", "(", "!", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "NamespaceInformationProvider", "::", "isNamespacedClass", "(", "...
Translate a given old class name like 'oxconfig' into a storage key as known by the Registry. If a new class name is used, the method just returns it as it is. @param string $className Class name to be converted. @return string
[ "Translate", "a", "given", "old", "class", "name", "like", "oxconfig", "into", "a", "storage", "key", "as", "known", "by", "the", "Registry", ".", "If", "a", "new", "class", "name", "is", "used", "the", "method", "just", "returns", "it", "as", "it", "i...
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Registry.php#L375-L385
train
OXID-eSales/oxideshop_ce
source/Core/Registry.php
Registry.getObject
protected static function getObject($className) { if (!isset(self::$instances[$className])) { self::$instances[$className] = self::createObject($className); } return self::$instances[$className]; }
php
protected static function getObject($className) { if (!isset(self::$instances[$className])) { self::$instances[$className] = self::createObject($className); } return self::$instances[$className]; }
[ "protected", "static", "function", "getObject", "(", "$", "className", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "instances", "[", "$", "className", "]", ")", ")", "{", "self", "::", "$", "instances", "[", "$", "className", "]", "=",...
Return a well known object from the registry @param string $className A unified namespace class name @return mixed
[ "Return", "a", "well", "known", "object", "from", "the", "registry" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Core/Registry.php#L416-L423
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.prepareRatingAndReviewPropertiesData
private function prepareRatingAndReviewPropertiesData($reviewAndRatingList) { foreach ($reviewAndRatingList as $reviewAndRating) { $this->setObjectTitleToReviewAndRating($reviewAndRating); $this->formatReviewText($reviewAndRating); $this->formatReviewAndRatingDate($reviewAndRating); } }
php
private function prepareRatingAndReviewPropertiesData($reviewAndRatingList) { foreach ($reviewAndRatingList as $reviewAndRating) { $this->setObjectTitleToReviewAndRating($reviewAndRating); $this->formatReviewText($reviewAndRating); $this->formatReviewAndRatingDate($reviewAndRating); } }
[ "private", "function", "prepareRatingAndReviewPropertiesData", "(", "$", "reviewAndRatingList", ")", "{", "foreach", "(", "$", "reviewAndRatingList", "as", "$", "reviewAndRating", ")", "{", "$", "this", "->", "setObjectTitleToReviewAndRating", "(", "$", "reviewAndRating...
Prepare RatingAndReview properties data. @param ArrayCollection $reviewAndRatingList
[ "Prepare", "RatingAndReview", "properties", "data", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L74-L81
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.formatReviewText
private function formatReviewText(ReviewAndRating $reviewAndRating) { $preparedText = htmlspecialchars($reviewAndRating->getReviewText()); $reviewAndRating->setReviewText($preparedText); }
php
private function formatReviewText(ReviewAndRating $reviewAndRating) { $preparedText = htmlspecialchars($reviewAndRating->getReviewText()); $reviewAndRating->setReviewText($preparedText); }
[ "private", "function", "formatReviewText", "(", "ReviewAndRating", "$", "reviewAndRating", ")", "{", "$", "preparedText", "=", "htmlspecialchars", "(", "$", "reviewAndRating", "->", "getReviewText", "(", ")", ")", ";", "$", "reviewAndRating", "->", "setReviewText", ...
Formats Review text. @param ReviewAndRating $reviewAndRating
[ "Formats", "Review", "text", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L88-L93
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.formatReviewAndRatingDate
private function formatReviewAndRatingDate(ReviewAndRating $reviewAndRating) { $formattedDate = Registry::getUtilsDate()->formatDBDate($reviewAndRating->getCreatedAt()); $reviewAndRating->setCreatedAt($formattedDate); }
php
private function formatReviewAndRatingDate(ReviewAndRating $reviewAndRating) { $formattedDate = Registry::getUtilsDate()->formatDBDate($reviewAndRating->getCreatedAt()); $reviewAndRating->setCreatedAt($formattedDate); }
[ "private", "function", "formatReviewAndRatingDate", "(", "ReviewAndRating", "$", "reviewAndRating", ")", "{", "$", "formattedDate", "=", "Registry", "::", "getUtilsDate", "(", ")", "->", "formatDBDate", "(", "$", "reviewAndRating", "->", "getCreatedAt", "(", ")", ...
Formats ReviewAndRating date. @param ReviewAndRating $reviewAndRating
[ "Formats", "ReviewAndRating", "date", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L100-L105
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.setObjectTitleToReviewAndRating
private function setObjectTitleToReviewAndRating(ReviewAndRating $reviewAndRating) { $title = $this->getObjectTitle( $reviewAndRating->getObjectType(), $reviewAndRating->getObjectId() ); $reviewAndRating->setObjectTitle($title); }
php
private function setObjectTitleToReviewAndRating(ReviewAndRating $reviewAndRating) { $title = $this->getObjectTitle( $reviewAndRating->getObjectType(), $reviewAndRating->getObjectId() ); $reviewAndRating->setObjectTitle($title); }
[ "private", "function", "setObjectTitleToReviewAndRating", "(", "ReviewAndRating", "$", "reviewAndRating", ")", "{", "$", "title", "=", "$", "this", "->", "getObjectTitle", "(", "$", "reviewAndRating", "->", "getObjectType", "(", ")", ",", "$", "reviewAndRating", "...
Sets object title to ReviewAndRating. @param ReviewAndRating $reviewAndRating
[ "Sets", "object", "title", "to", "ReviewAndRating", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L112-L120
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.getObjectTitle
private function getObjectTitle($type, $objectId) { $objectModel = $this->getObjectModel($type); $objectModel->load($objectId); $fieldName = $this->getObjectTitleFieldName($type); $field = $objectModel->$fieldName; return $field->value; }
php
private function getObjectTitle($type, $objectId) { $objectModel = $this->getObjectModel($type); $objectModel->load($objectId); $fieldName = $this->getObjectTitleFieldName($type); $field = $objectModel->$fieldName; return $field->value; }
[ "private", "function", "getObjectTitle", "(", "$", "type", ",", "$", "objectId", ")", "{", "$", "objectModel", "=", "$", "this", "->", "getObjectModel", "(", "$", "type", ")", ";", "$", "objectModel", "->", "load", "(", "$", "objectId", ")", ";", "$", ...
Returns object title. @param string $type @param string $objectId @return string
[ "Returns", "object", "title", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L130-L139
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.getObjectModel
private function getObjectModel($type) { if ($type === 'oxarticle') { $model = oxNew(Article::class); } if ($type === 'oxrecommlist') { $model = oxNew(RecommendationList::class); } if (!isset($model)) { throw new ReviewAndRatingObjectTypeException(); } return $model; }
php
private function getObjectModel($type) { if ($type === 'oxarticle') { $model = oxNew(Article::class); } if ($type === 'oxrecommlist') { $model = oxNew(RecommendationList::class); } if (!isset($model)) { throw new ReviewAndRatingObjectTypeException(); } return $model; }
[ "private", "function", "getObjectModel", "(", "$", "type", ")", "{", "if", "(", "$", "type", "===", "'oxarticle'", ")", "{", "$", "model", "=", "oxNew", "(", "Article", "::", "class", ")", ";", "}", "if", "(", "$", "type", "===", "'oxrecommlist'", ")...
Returns object model. @param string $type @return Article|RecommendationList @throws ReviewAndRatingObjectTypeException
[ "Returns", "object", "model", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L149-L164
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Bridge/UserReviewAndRatingBridge.php
UserReviewAndRatingBridge.getObjectTitleFieldName
private function getObjectTitleFieldName($type) { if ($type === 'oxarticle') { $fieldName = 'oxarticles__oxtitle'; } if ($type === 'oxrecommlist') { $fieldName = 'oxrecommlists__oxtitle'; } if (!isset($fieldName)) { throw new ReviewAndRatingObjectTypeException(); } return $fieldName; }
php
private function getObjectTitleFieldName($type) { if ($type === 'oxarticle') { $fieldName = 'oxarticles__oxtitle'; } if ($type === 'oxrecommlist') { $fieldName = 'oxrecommlists__oxtitle'; } if (!isset($fieldName)) { throw new ReviewAndRatingObjectTypeException(); } return $fieldName; }
[ "private", "function", "getObjectTitleFieldName", "(", "$", "type", ")", "{", "if", "(", "$", "type", "===", "'oxarticle'", ")", "{", "$", "fieldName", "=", "'oxarticles__oxtitle'", ";", "}", "if", "(", "$", "type", "===", "'oxrecommlist'", ")", "{", "$", ...
Returns field name of the object title. @param string $type @return string @throws ReviewAndRatingObjectTypeException
[ "Returns", "field", "name", "of", "the", "object", "title", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Bridge/UserReviewAndRatingBridge.php#L174-L189
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._getParentProduct
protected function _getParentProduct($parentId) { if ($parentId && $this->_oParentProd === null) { $this->_oParentProd = false; $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); if (($article->load($parentId))) { $this->_processProduct($article); $this->_oParentProd = $article; } } return $this->_oParentProd; }
php
protected function _getParentProduct($parentId) { if ($parentId && $this->_oParentProd === null) { $this->_oParentProd = false; $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); if (($article->load($parentId))) { $this->_processProduct($article); $this->_oParentProd = $article; } } return $this->_oParentProd; }
[ "protected", "function", "_getParentProduct", "(", "$", "parentId", ")", "{", "if", "(", "$", "parentId", "&&", "$", "this", "->", "_oParentProd", "===", "null", ")", "{", "$", "this", "->", "_oParentProd", "=", "false", ";", "$", "article", "=", "oxNew"...
Returns current product parent article object if it is available @param string $parentId parent product id @return \OxidEsales\Eshop\Application\Model\Article
[ "Returns", "current", "product", "parent", "article", "object", "if", "it", "is", "available" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L171-L183
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._processProduct
protected function _processProduct($article) { $article->setLinkType($this->getLinkType()); if ($dynamicParameters = $this->_getAddUrlParams()) { $article->appendLink($dynamicParameters); } }
php
protected function _processProduct($article) { $article->setLinkType($this->getLinkType()); if ($dynamicParameters = $this->_getAddUrlParams()) { $article->appendLink($dynamicParameters); } }
[ "protected", "function", "_processProduct", "(", "$", "article", ")", "{", "$", "article", "->", "setLinkType", "(", "$", "this", "->", "getLinkType", "(", ")", ")", ";", "if", "(", "$", "dynamicParameters", "=", "$", "this", "->", "_getAddUrlParams", "(",...
Processes product by setting link type and in case list type is search adds search parameters to details link @param \OxidEsales\Eshop\Application\Model\Article $article Product to process
[ "Processes", "product", "by", "setting", "link", "type", "and", "in", "case", "list", "type", "is", "search", "adds", "search", "parameters", "to", "details", "link" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L236-L242
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.addToRecomm
public function addToRecomm() { if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) { return; } if (!$this->getViewConfig()->getShowListmania()) { return; } $recommendationText = trim(( string ) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('recomm_txt')); $recommendationListId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('recomm'); $articleId = $this->getProduct()->getId(); if ($articleId) { $recommendationList = oxNew(\OxidEsales\Eshop\Application\Model\RecommendationList::class); $recommendationList->load($recommendationListId); $recommendationList->addArticle($articleId, $recommendationText); } }
php
public function addToRecomm() { if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) { return; } if (!$this->getViewConfig()->getShowListmania()) { return; } $recommendationText = trim(( string ) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('recomm_txt')); $recommendationListId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('recomm'); $articleId = $this->getProduct()->getId(); if ($articleId) { $recommendationList = oxNew(\OxidEsales\Eshop\Application\Model\RecommendationList::class); $recommendationList->load($recommendationListId); $recommendationList->addArticle($articleId, $recommendationText); } }
[ "public", "function", "addToRecomm", "(", ")", "{", "if", "(", "!", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getSession", "(", ")", "->", "checkSessionChallenge", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", ...
Adds article to selected recommendation list @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module. @return null
[ "Adds", "article", "to", "selected", "recommendation", "list" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L425-L444
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getProduct
public function getProduct() { $config = \OxidEsales\Eshop\Core\Registry::getConfig(); $utils = \OxidEsales\Eshop\Core\Registry::getUtils(); if ($this->_oProduct === null) { //this option is only for lists and we must reset value //as blLoadVariants = false affect "ab price" functionality $config->setConfigParam('blLoadVariants', true); $articleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('anid'); // object is not yet loaded $this->_oProduct = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); if (!$this->_oProduct->load($articleId)) { $utils->redirect($config->getShopHomeUrl()); $utils->showMessageAndExit(''); } $variantSelectionId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("varselid"); $variantSelections = $this->_oProduct->getVariantSelections($variantSelectionId); if ($variantSelections && $variantSelections['oActiveVariant'] && $variantSelections['blPerfectFit']) { $this->_oProduct = $variantSelections['oActiveVariant']; } } // additional checks if (!$this->_blIsInitialized) { $this->_additionalChecksForArticle(); } return $this->_oProduct; }
php
public function getProduct() { $config = \OxidEsales\Eshop\Core\Registry::getConfig(); $utils = \OxidEsales\Eshop\Core\Registry::getUtils(); if ($this->_oProduct === null) { //this option is only for lists and we must reset value //as blLoadVariants = false affect "ab price" functionality $config->setConfigParam('blLoadVariants', true); $articleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('anid'); // object is not yet loaded $this->_oProduct = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); if (!$this->_oProduct->load($articleId)) { $utils->redirect($config->getShopHomeUrl()); $utils->showMessageAndExit(''); } $variantSelectionId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("varselid"); $variantSelections = $this->_oProduct->getVariantSelections($variantSelectionId); if ($variantSelections && $variantSelections['oActiveVariant'] && $variantSelections['blPerfectFit']) { $this->_oProduct = $variantSelections['oActiveVariant']; } } // additional checks if (!$this->_blIsInitialized) { $this->_additionalChecksForArticle(); } return $this->_oProduct; }
[ "public", "function", "getProduct", "(", ")", "{", "$", "config", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", ";", "$", "utils", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Regis...
Returns current product @return \OxidEsales\Eshop\Application\Model\Article
[ "Returns", "current", "product" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L463-L496
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getLinkType
public function getLinkType() { if ($this->_iLinkType === null) { $listType = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('listtype'); if ('vendor' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_VENDOR; } elseif ('manufacturer' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_MANUFACTURER; // @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module. } elseif ('recommlist' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_RECOMM; // END deprecated } else { $this->_iLinkType = OXARTICLE_LINKTYPE_CATEGORY; // price category has own type.. $activeCategory = $this->getActiveCategory(); if ($activeCategory && $activeCategory->isPriceCategory()) { $this->_iLinkType = OXARTICLE_LINKTYPE_PRICECATEGORY; } } } return $this->_iLinkType; }
php
public function getLinkType() { if ($this->_iLinkType === null) { $listType = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('listtype'); if ('vendor' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_VENDOR; } elseif ('manufacturer' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_MANUFACTURER; // @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module. } elseif ('recommlist' == $listType) { $this->_iLinkType = OXARTICLE_LINKTYPE_RECOMM; // END deprecated } else { $this->_iLinkType = OXARTICLE_LINKTYPE_CATEGORY; // price category has own type.. $activeCategory = $this->getActiveCategory(); if ($activeCategory && $activeCategory->isPriceCategory()) { $this->_iLinkType = OXARTICLE_LINKTYPE_PRICECATEGORY; } } } return $this->_iLinkType; }
[ "public", "function", "getLinkType", "(", ")", "{", "if", "(", "$", "this", "->", "_iLinkType", "===", "null", ")", "{", "$", "listType", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", "->", "getReq...
Returns current view link type @return int
[ "Returns", "current", "view", "link", "type" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L530-L554
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getPictureGallery
public function getPictureGallery() { if ($this->_aPicGallery === null) { //get picture gallery $this->_aPicGallery = $this->getPicturesProduct()->getPictureGallery(); } return $this->_aPicGallery; }
php
public function getPictureGallery() { if ($this->_aPicGallery === null) { //get picture gallery $this->_aPicGallery = $this->getPicturesProduct()->getPictureGallery(); } return $this->_aPicGallery; }
[ "public", "function", "getPictureGallery", "(", ")", "{", "if", "(", "$", "this", "->", "_aPicGallery", "===", "null", ")", "{", "//get picture gallery", "$", "this", "->", "_aPicGallery", "=", "$", "this", "->", "getPicturesProduct", "(", ")", "->", "getPic...
Template variable getter. Returns picture gallery of current article @return array
[ "Template", "variable", "getter", ".", "Returns", "picture", "gallery", "of", "current", "article" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L571-L579
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getSelectLists
public function getSelectLists() { if ($this->_aSelectLists === null) { $this->_aSelectLists = false; if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) { $this->_aSelectLists = $this->getProduct()->getSelectLists(); } } return $this->_aSelectLists; }
php
public function getSelectLists() { if ($this->_aSelectLists === null) { $this->_aSelectLists = false; if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) { $this->_aSelectLists = $this->getProduct()->getSelectLists(); } } return $this->_aSelectLists; }
[ "public", "function", "getSelectLists", "(", ")", "{", "if", "(", "$", "this", "->", "_aSelectLists", "===", "null", ")", "{", "$", "this", "->", "_aSelectLists", "=", "false", ";", "if", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Reg...
Template variable getter. Returns selectLists of current article @return array
[ "Template", "variable", "getter", ".", "Returns", "selectLists", "of", "current", "article" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L628-L638
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getReviews
public function getReviews() { if ($this->_aReviews === null) { $this->_aReviews = false; if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadReviews')) { $this->_aReviews = $this->getProduct()->getReviews(); } } return $this->_aReviews; }
php
public function getReviews() { if ($this->_aReviews === null) { $this->_aReviews = false; if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadReviews')) { $this->_aReviews = $this->getProduct()->getReviews(); } } return $this->_aReviews; }
[ "public", "function", "getReviews", "(", ")", "{", "if", "(", "$", "this", "->", "_aReviews", "===", "null", ")", "{", "$", "this", "->", "_aReviews", "=", "false", ";", "if", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", ":...
Template variable getter. Returns reviews of current article @return array
[ "Template", "variable", "getter", ".", "Returns", "reviews", "of", "current", "article" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L645-L655
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getCrossSelling
public function getCrossSelling() { if ($this->_oCrossSelling === null) { $this->_oCrossSelling = false; if ($article = $this->getProduct()) { $this->_oCrossSelling = $article->getCrossSelling(); } } return $this->_oCrossSelling; }
php
public function getCrossSelling() { if ($this->_oCrossSelling === null) { $this->_oCrossSelling = false; if ($article = $this->getProduct()) { $this->_oCrossSelling = $article->getCrossSelling(); } } return $this->_oCrossSelling; }
[ "public", "function", "getCrossSelling", "(", ")", "{", "if", "(", "$", "this", "->", "_oCrossSelling", "===", "null", ")", "{", "$", "this", "->", "_oCrossSelling", "=", "false", ";", "if", "(", "$", "article", "=", "$", "this", "->", "getProduct", "(...
Template variable getter. Returns cross selling @return object
[ "Template", "variable", "getter", ".", "Returns", "cross", "selling" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L662-L672
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getSimilarProducts
public function getSimilarProducts() { if ($this->_oSimilarProducts === null) { $this->_oSimilarProducts = false; if ($article = $this->getProduct()) { $this->_oSimilarProducts = $article->getSimilarProducts(); } } return $this->_oSimilarProducts; }
php
public function getSimilarProducts() { if ($this->_oSimilarProducts === null) { $this->_oSimilarProducts = false; if ($article = $this->getProduct()) { $this->_oSimilarProducts = $article->getSimilarProducts(); } } return $this->_oSimilarProducts; }
[ "public", "function", "getSimilarProducts", "(", ")", "{", "if", "(", "$", "this", "->", "_oSimilarProducts", "===", "null", ")", "{", "$", "this", "->", "_oSimilarProducts", "=", "false", ";", "if", "(", "$", "article", "=", "$", "this", "->", "getProdu...
Template variable getter. Returns similar article list @return object
[ "Template", "variable", "getter", ".", "Returns", "similar", "article", "list" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L679-L689
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getAccessoires
public function getAccessoires() { if ($this->_oAccessoires === null) { $this->_oAccessoires = false; if ($article = $this->getProduct()) { $this->_oAccessoires = $article->getAccessoires(); } } return $this->_oAccessoires; }
php
public function getAccessoires() { if ($this->_oAccessoires === null) { $this->_oAccessoires = false; if ($article = $this->getProduct()) { $this->_oAccessoires = $article->getAccessoires(); } } return $this->_oAccessoires; }
[ "public", "function", "getAccessoires", "(", ")", "{", "if", "(", "$", "this", "->", "_oAccessoires", "===", "null", ")", "{", "$", "this", "->", "_oAccessoires", "=", "false", ";", "if", "(", "$", "article", "=", "$", "this", "->", "getProduct", "(", ...
Template variable getter. Returns accessories of article @return object
[ "Template", "variable", "getter", ".", "Returns", "accessories", "of", "article" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L716-L726
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.noIndex
public function noIndex() { $listType = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('listtype'); if ($listType && ('vendor' == $listType || 'manufacturer' == $listType)) { return $this->_iViewIndexState = VIEW_INDEXSTATE_NOINDEXFOLLOW; } return parent::noIndex(); }
php
public function noIndex() { $listType = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('listtype'); if ($listType && ('vendor' == $listType || 'manufacturer' == $listType)) { return $this->_iViewIndexState = VIEW_INDEXSTATE_NOINDEXFOLLOW; } return parent::noIndex(); }
[ "public", "function", "noIndex", "(", ")", "{", "$", "listType", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", "->", "getRequestParameter", "(", "'listtype'", ")", ";", "if", "(", "$", "listType", "&...
If product details are accessed by vendor url view must not be indexable @return int
[ "If", "product", "details", "are", "accessed", "by", "vendor", "url", "view", "must", "not", "be", "indexable" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L804-L812
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getTitle
public function getTitle() { if ($article = $this->getProduct()) { $articleTitle = $article->oxarticles__oxtitle->value; $variantSelectionId = $article->oxarticles__oxvarselect->value; $variantSelectionValue = $variantSelectionId ? ' ' . $variantSelectionId : ''; return $articleTitle . $variantSelectionValue; } }
php
public function getTitle() { if ($article = $this->getProduct()) { $articleTitle = $article->oxarticles__oxtitle->value; $variantSelectionId = $article->oxarticles__oxvarselect->value; $variantSelectionValue = $variantSelectionId ? ' ' . $variantSelectionId : ''; return $articleTitle . $variantSelectionValue; } }
[ "public", "function", "getTitle", "(", ")", "{", "if", "(", "$", "article", "=", "$", "this", "->", "getProduct", "(", ")", ")", "{", "$", "articleTitle", "=", "$", "article", "->", "oxarticles__oxtitle", "->", "value", ";", "$", "variantSelectionId", "=...
Returns current view title. Default is null @return null
[ "Returns", "current", "view", "title", ".", "Default", "is", "null" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L819-L829
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getVariantSelections
public function getVariantSelections() { $article = $this->getProduct(); $variantSelectionListId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("varselid"); if (($articleParent = $this->_getParentProduct($article->oxarticles__oxparentid->value))) { return $articleParent->getVariantSelections($variantSelectionListId, $article->getId()); } return $article->getVariantSelections($variantSelectionListId); }
php
public function getVariantSelections() { $article = $this->getProduct(); $variantSelectionListId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("varselid"); if (($articleParent = $this->_getParentProduct($article->oxarticles__oxparentid->value))) { return $articleParent->getVariantSelections($variantSelectionListId, $article->getId()); } return $article->getVariantSelections($variantSelectionListId); }
[ "public", "function", "getVariantSelections", "(", ")", "{", "$", "article", "=", "$", "this", "->", "getProduct", "(", ")", ";", "$", "variantSelectionListId", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ...
Returns variant selection @return oxVariantSelectList
[ "Returns", "variant", "selection" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L952-L961
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getPicturesProduct
public function getPicturesProduct() { $variantSelections = $this->getVariantSelections(); if ($variantSelections && $variantSelections['oActiveVariant'] && !$variantSelections['blPerfectFit']) { return $variantSelections['oActiveVariant']; } return $this->getProduct(); }
php
public function getPicturesProduct() { $variantSelections = $this->getVariantSelections(); if ($variantSelections && $variantSelections['oActiveVariant'] && !$variantSelections['blPerfectFit']) { return $variantSelections['oActiveVariant']; } return $this->getProduct(); }
[ "public", "function", "getPicturesProduct", "(", ")", "{", "$", "variantSelections", "=", "$", "this", "->", "getVariantSelections", "(", ")", ";", "if", "(", "$", "variantSelections", "&&", "$", "variantSelections", "[", "'oActiveVariant'", "]", "&&", "!", "$...
Returns pictures product object @return \OxidEsales\Eshop\Application\Model\Article
[ "Returns", "pictures", "product", "object" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L968-L976
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getRDFaNormalizedRating
public function getRDFaNormalizedRating() { $config = \OxidEsales\Eshop\Core\Registry::getConfig(); $minRating = $config->getConfigParam("iRDFaMinRating"); $maxRating = $config->getConfigParam("iRDFaMaxRating"); $article = $this->getProduct(); $count = $article->oxarticles__oxratingcnt->value; if (isset($minRating) && isset($maxRating) && $maxRating != '' && $minRating != '' && $count > 0) { $normalizedRating = []; $value = ((4 * ($article->oxarticles__oxrating->value - $minRating) / ($maxRating - $minRating))) + 1; $normalizedRating["count"] = $count; $normalizedRating["value"] = round($value, 2); return $normalizedRating; } return false; }
php
public function getRDFaNormalizedRating() { $config = \OxidEsales\Eshop\Core\Registry::getConfig(); $minRating = $config->getConfigParam("iRDFaMinRating"); $maxRating = $config->getConfigParam("iRDFaMaxRating"); $article = $this->getProduct(); $count = $article->oxarticles__oxratingcnt->value; if (isset($minRating) && isset($maxRating) && $maxRating != '' && $minRating != '' && $count > 0) { $normalizedRating = []; $value = ((4 * ($article->oxarticles__oxrating->value - $minRating) / ($maxRating - $minRating))) + 1; $normalizedRating["count"] = $count; $normalizedRating["value"] = round($value, 2); return $normalizedRating; } return false; }
[ "public", "function", "getRDFaNormalizedRating", "(", ")", "{", "$", "config", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getConfig", "(", ")", ";", "$", "minRating", "=", "$", "config", "->", "getConfigParam", "(", "\"i...
Sets normalized rating @return array
[ "Sets", "normalized", "rating" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1007-L1025
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getRDFaValidityPeriod
public function getRDFaValidityPeriod($configVariableName) { if ($configVariableName) { $validity = []; $days = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam($configVariableName); $from = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime(); $through = $from + ($days * 24 * 60 * 60); $validity["from"] = date('Y-m-d\TH:i:s', $from) . "Z"; $validity["through"] = date('Y-m-d\TH:i:s', $through) . "Z"; return $validity; } return false; }
php
public function getRDFaValidityPeriod($configVariableName) { if ($configVariableName) { $validity = []; $days = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam($configVariableName); $from = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime(); $through = $from + ($days * 24 * 60 * 60); $validity["from"] = date('Y-m-d\TH:i:s', $from) . "Z"; $validity["through"] = date('Y-m-d\TH:i:s', $through) . "Z"; return $validity; } return false; }
[ "public", "function", "getRDFaValidityPeriod", "(", "$", "configVariableName", ")", "{", "if", "(", "$", "configVariableName", ")", "{", "$", "validity", "=", "[", "]", ";", "$", "days", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry...
Sets and returns validity period of given object @param string $configVariableName object name @return array
[ "Sets", "and", "returns", "validity", "period", "of", "given", "object" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1034-L1049
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getBundleArticle
public function getBundleArticle() { $article = $this->getProduct(); if ($article && $article->oxarticles__oxbundleid->value) { $bundle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); $bundle->load($article->oxarticles__oxbundleid->value); return $bundle; } return false; }
php
public function getBundleArticle() { $article = $this->getProduct(); if ($article && $article->oxarticles__oxbundleid->value) { $bundle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class); $bundle->load($article->oxarticles__oxbundleid->value); return $bundle; } return false; }
[ "public", "function", "getBundleArticle", "(", ")", "{", "$", "article", "=", "$", "this", "->", "getProduct", "(", ")", ";", "if", "(", "$", "article", "&&", "$", "article", "->", "oxarticles__oxbundleid", "->", "value", ")", "{", "$", "bundle", "=", ...
Returns bundle product @return \OxidEsales\Eshop\Application\Model\Article|false
[ "Returns", "bundle", "product" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1096-L1107
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getRDFaPaymentMethods
public function getRDFaPaymentMethods() { $price = $this->getProduct()->getPrice()->getBruttoPrice(); $paymentList = oxNew(\OxidEsales\Eshop\Application\Model\PaymentList::class); $paymentList->loadRDFaPaymentList($price); return $paymentList; }
php
public function getRDFaPaymentMethods() { $price = $this->getProduct()->getPrice()->getBruttoPrice(); $paymentList = oxNew(\OxidEsales\Eshop\Application\Model\PaymentList::class); $paymentList->loadRDFaPaymentList($price); return $paymentList; }
[ "public", "function", "getRDFaPaymentMethods", "(", ")", "{", "$", "price", "=", "$", "this", "->", "getProduct", "(", ")", "->", "getPrice", "(", ")", "->", "getBruttoPrice", "(", ")", ";", "$", "paymentList", "=", "oxNew", "(", "\\", "OxidEsales", "\\"...
Gets accepted payment methods @return oxPaymentList
[ "Gets", "accepted", "payment", "methods" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1114-L1121
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getRDFaDeliverySetMethods
public function getRDFaDeliverySetMethods() { $deliverySetList = oxNew(\OxidEsales\Eshop\Application\Model\DeliverySetList::class); $deliverySetList->loadRDFaDeliverySetList(); return $deliverySetList; }
php
public function getRDFaDeliverySetMethods() { $deliverySetList = oxNew(\OxidEsales\Eshop\Application\Model\DeliverySetList::class); $deliverySetList->loadRDFaDeliverySetList(); return $deliverySetList; }
[ "public", "function", "getRDFaDeliverySetMethods", "(", ")", "{", "$", "deliverySetList", "=", "oxNew", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "DeliverySetList", "::", "class", ")", ";", "$", "deliverySetList", "->", ...
Returns delivery methods with assigned delivery sets. @return oxDeliverySetList
[ "Returns", "delivery", "methods", "with", "assigned", "delivery", "sets", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1128-L1134
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getProductsDeliveryList
public function getProductsDeliveryList() { $article = $this->getProduct(); $deliveryList = oxNew(\OxidEsales\Eshop\Application\Model\DeliveryList::class); $deliveryList->loadDeliveryListForProduct($article); return $deliveryList; }
php
public function getProductsDeliveryList() { $article = $this->getProduct(); $deliveryList = oxNew(\OxidEsales\Eshop\Application\Model\DeliveryList::class); $deliveryList->loadDeliveryListForProduct($article); return $deliveryList; }
[ "public", "function", "getProductsDeliveryList", "(", ")", "{", "$", "article", "=", "$", "this", "->", "getProduct", "(", ")", ";", "$", "deliveryList", "=", "oxNew", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Deliv...
Template variable getter. Returns delivery list for current product @return oxDeliveryList
[ "Template", "variable", "getter", ".", "Returns", "delivery", "list", "for", "current", "product" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1141-L1148
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController.getSortingParameters
public function getSortingParameters() { $sorting = $this->getSorting($this->getSortIdent()); if (!is_array($sorting)) { return null; } return implode('|', $sorting); }
php
public function getSortingParameters() { $sorting = $this->getSorting($this->getSortIdent()); if (!is_array($sorting)) { return null; } return implode('|', $sorting); }
[ "public", "function", "getSortingParameters", "(", ")", "{", "$", "sorting", "=", "$", "this", "->", "getSorting", "(", "$", "this", "->", "getSortIdent", "(", ")", ")", ";", "if", "(", "!", "is_array", "(", "$", "sorting", ")", ")", "{", "return", "...
Returns sorting parameters separated by "|" @return string
[ "Returns", "sorting", "parameters", "separated", "by", "|" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1235-L1243
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._getVendorBreadCrumb
protected function _getVendorBreadCrumb() { $paths = []; $vendorPath = []; $vendor = oxNew(\OxidEsales\Eshop\Application\Model\Vendor::class); $vendor->load('root'); $vendorPath['link'] = $vendor->getLink(); $vendorPath['title'] = $vendor->oxvendor__oxtitle->value; $paths[] = $vendorPath; $vendor = $this->getActVendor(); if ($vendor instanceof \OxidEsales\Eshop\Application\Model\Vendor) { $vendorPath['link'] = $vendor->getLink(); $vendorPath['title'] = $vendor->oxvendor__oxtitle->value; $paths[] = $vendorPath; } return $paths; }
php
protected function _getVendorBreadCrumb() { $paths = []; $vendorPath = []; $vendor = oxNew(\OxidEsales\Eshop\Application\Model\Vendor::class); $vendor->load('root'); $vendorPath['link'] = $vendor->getLink(); $vendorPath['title'] = $vendor->oxvendor__oxtitle->value; $paths[] = $vendorPath; $vendor = $this->getActVendor(); if ($vendor instanceof \OxidEsales\Eshop\Application\Model\Vendor) { $vendorPath['link'] = $vendor->getLink(); $vendorPath['title'] = $vendor->oxvendor__oxtitle->value; $paths[] = $vendorPath; } return $paths; }
[ "protected", "function", "_getVendorBreadCrumb", "(", ")", "{", "$", "paths", "=", "[", "]", ";", "$", "vendorPath", "=", "[", "]", ";", "$", "vendor", "=", "oxNew", "(", "\\", "OxidEsales", "\\", "Eshop", "\\", "Application", "\\", "Model", "\\", "Ven...
Vendor bread crumb @return array
[ "Vendor", "bread", "crumb" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1250-L1270
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._getRecommendationListBredCrumb
protected function _getRecommendationListBredCrumb() { $paths = []; $recommListPath = []; $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage(); $recommListPath['title'] = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('LISTMANIA', $baseLanguageId, false); $paths[] = $recommListPath; return $paths; }
php
protected function _getRecommendationListBredCrumb() { $paths = []; $recommListPath = []; $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage(); $recommListPath['title'] = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('LISTMANIA', $baseLanguageId, false); $paths[] = $recommListPath; return $paths; }
[ "protected", "function", "_getRecommendationListBredCrumb", "(", ")", "{", "$", "paths", "=", "[", "]", ";", "$", "recommListPath", "=", "[", "]", ";", "$", "baseLanguageId", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "ge...
Recommendation list bread crumb @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module. @return array
[ "Recommendation", "list", "bread", "crumb" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1279-L1288
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._getSearchBreadCrumb
protected function _getSearchBreadCrumb() { $paths = []; $searchPath = []; $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage(); $translatedString = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('SEARCH_RESULT', $baseLanguageId, false); $selfLink = $this->getViewConfig()->getSelfLink(); $sessionToken = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sess_stoken'); $searchPath['title'] = sprintf($translatedString, $this->getSearchParamForHtml()); $searchPath['link'] = $selfLink . 'stoken=' . $sessionToken . "&amp;cl=search&amp;". "searchparam=" . $this->getSearchParamForHtml(); $paths[] = $searchPath; return $paths; }
php
protected function _getSearchBreadCrumb() { $paths = []; $searchPath = []; $baseLanguageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage(); $translatedString = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('SEARCH_RESULT', $baseLanguageId, false); $selfLink = $this->getViewConfig()->getSelfLink(); $sessionToken = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sess_stoken'); $searchPath['title'] = sprintf($translatedString, $this->getSearchParamForHtml()); $searchPath['link'] = $selfLink . 'stoken=' . $sessionToken . "&amp;cl=search&amp;". "searchparam=" . $this->getSearchParamForHtml(); $paths[] = $searchPath; return $paths; }
[ "protected", "function", "_getSearchBreadCrumb", "(", ")", "{", "$", "paths", "=", "[", "]", ";", "$", "searchPath", "=", "[", "]", ";", "$", "baseLanguageId", "=", "\\", "OxidEsales", "\\", "Eshop", "\\", "Core", "\\", "Registry", "::", "getLang", "(", ...
Search bread crumb @return array
[ "Search", "bread", "crumb" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1295-L1312
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ArticleDetailsController.php
ArticleDetailsController._getCategoryBreadCrumb
protected function _getCategoryBreadCrumb() { $paths = []; $categoryTree = $this->getCatTreePath(); if ($categoryTree) { foreach ($categoryTree as $category) { /** @var \OxidEsales\Eshop\Application\Model\Category $category */ $categoryPath = []; $categoryPath['link'] = $category->getLink(); $categoryPath['title'] = $category->oxcategories__oxtitle->value; $paths[] = $categoryPath; } } return $paths; }
php
protected function _getCategoryBreadCrumb() { $paths = []; $categoryTree = $this->getCatTreePath(); if ($categoryTree) { foreach ($categoryTree as $category) { /** @var \OxidEsales\Eshop\Application\Model\Category $category */ $categoryPath = []; $categoryPath['link'] = $category->getLink(); $categoryPath['title'] = $category->oxcategories__oxtitle->value; $paths[] = $categoryPath; } } return $paths; }
[ "protected", "function", "_getCategoryBreadCrumb", "(", ")", "{", "$", "paths", "=", "[", "]", ";", "$", "categoryTree", "=", "$", "this", "->", "getCatTreePath", "(", ")", ";", "if", "(", "$", "categoryTree", ")", "{", "foreach", "(", "$", "categoryTree...
Category bread crumb @return array
[ "Category", "bread", "crumb" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ArticleDetailsController.php#L1319-L1338
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Dao/ReviewDao.php
ReviewDao.getReviewsByUserId
public function getReviewsByUserId($userId) { $queryBuilder = $this->queryBuilderFactory->create(); $queryBuilder ->select('r.*') ->from('oxreviews', 'r') ->where('r.oxuserid = :userId') ->orderBy('r.oxcreate', 'DESC') ->setParameter('userId', $userId); return $this->mapReviews($queryBuilder->execute()->fetchAll()); }
php
public function getReviewsByUserId($userId) { $queryBuilder = $this->queryBuilderFactory->create(); $queryBuilder ->select('r.*') ->from('oxreviews', 'r') ->where('r.oxuserid = :userId') ->orderBy('r.oxcreate', 'DESC') ->setParameter('userId', $userId); return $this->mapReviews($queryBuilder->execute()->fetchAll()); }
[ "public", "function", "getReviewsByUserId", "(", "$", "userId", ")", "{", "$", "queryBuilder", "=", "$", "this", "->", "queryBuilderFactory", "->", "create", "(", ")", ";", "$", "queryBuilder", "->", "select", "(", "'r.*'", ")", "->", "from", "(", "'oxrevi...
Returns User Reviews. @param string $userId @return ArrayCollection
[ "Returns", "User", "Reviews", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Dao/ReviewDao.php#L48-L59
train
OXID-eSales/oxideshop_ce
source/Internal/Review/Dao/ReviewDao.php
ReviewDao.mapReviews
private function mapReviews($reviewsData) { $reviews = new ArrayCollection(); foreach ($reviewsData as $reviewData) { $review = new Review(); $reviews[] = $this->mapper->map($review, $reviewData); } return $reviews; }
php
private function mapReviews($reviewsData) { $reviews = new ArrayCollection(); foreach ($reviewsData as $reviewData) { $review = new Review(); $reviews[] = $this->mapper->map($review, $reviewData); } return $reviews; }
[ "private", "function", "mapReviews", "(", "$", "reviewsData", ")", "{", "$", "reviews", "=", "new", "ArrayCollection", "(", ")", ";", "foreach", "(", "$", "reviewsData", "as", "$", "reviewData", ")", "{", "$", "review", "=", "new", "Review", "(", ")", ...
Maps rating data from database to Reviews Collection. @param array $reviewsData @return ArrayCollection
[ "Maps", "rating", "data", "from", "database", "to", "Reviews", "Collection", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Internal/Review/Dao/ReviewDao.php#L81-L91
train
OXID-eSales/oxideshop_ce
source/Application/Controller/Admin/ContentList.php
ContentList._prepareWhereQuery
protected function _prepareWhereQuery($aWhere, $sqlFull) { $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull); $sFolder = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('folder'); $sViewName = getviewName("oxcontents"); //searchong for empty oxfolder fields if ($sFolder == 'CMSFOLDER_NONE' || $sFolder == 'CMSFOLDER_NONE_RR') { $sQ .= " and {$sViewName}.oxfolder = '' "; } elseif ($sFolder && $sFolder != '-1') { $sFolder = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sFolder); $sQ .= " and {$sViewName}.oxfolder = {$sFolder}"; } return $sQ; }
php
protected function _prepareWhereQuery($aWhere, $sqlFull) { $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull); $sFolder = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('folder'); $sViewName = getviewName("oxcontents"); //searchong for empty oxfolder fields if ($sFolder == 'CMSFOLDER_NONE' || $sFolder == 'CMSFOLDER_NONE_RR') { $sQ .= " and {$sViewName}.oxfolder = '' "; } elseif ($sFolder && $sFolder != '-1') { $sFolder = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sFolder); $sQ .= " and {$sViewName}.oxfolder = {$sFolder}"; } return $sQ; }
[ "protected", "function", "_prepareWhereQuery", "(", "$", "aWhere", ",", "$", "sqlFull", ")", "{", "$", "sQ", "=", "parent", "::", "_prepareWhereQuery", "(", "$", "aWhere", ",", "$", "sqlFull", ")", ";", "$", "sFolder", "=", "\\", "OxidEsales", "\\", "Esh...
Adding folder check and empty folder field check. @param array $aWhere SQL condition array @param string $sqlFull SQL query string @return string
[ "Adding", "folder", "check", "and", "empty", "folder", "field", "check", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/Admin/ContentList.php#L68-L83
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ManufacturerListController.php
ManufacturerListController._loadArticles
protected function _loadArticles($oManufacturer) { $sManufacturerId = $oManufacturer->getId(); // load only articles which we show on screen $iNrofCatArticles = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles'); $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1; $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class); $oArtList->setSqlLimit($iNrofCatArticles * $this->_getRequestPageNr(), $iNrofCatArticles); $oArtList->setCustomSorting($this->getSortingSql($this->getSortIdent())); // load the articles $this->_iAllArtCnt = $oArtList->loadManufacturerArticles($sManufacturerId, $oManufacturer); // counting pages $this->_iCntPages = ceil($this->_iAllArtCnt / $iNrofCatArticles); return [$oArtList, $this->_iAllArtCnt]; }
php
protected function _loadArticles($oManufacturer) { $sManufacturerId = $oManufacturer->getId(); // load only articles which we show on screen $iNrofCatArticles = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles'); $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1; $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class); $oArtList->setSqlLimit($iNrofCatArticles * $this->_getRequestPageNr(), $iNrofCatArticles); $oArtList->setCustomSorting($this->getSortingSql($this->getSortIdent())); // load the articles $this->_iAllArtCnt = $oArtList->loadManufacturerArticles($sManufacturerId, $oManufacturer); // counting pages $this->_iCntPages = ceil($this->_iAllArtCnt / $iNrofCatArticles); return [$oArtList, $this->_iAllArtCnt]; }
[ "protected", "function", "_loadArticles", "(", "$", "oManufacturer", ")", "{", "$", "sManufacturerId", "=", "$", "oManufacturer", "->", "getId", "(", ")", ";", "// load only articles which we show on screen", "$", "iNrofCatArticles", "=", "(", "int", ")", "\\", "O...
Loads and returns article list of active Manufacturer. @param \OxidEsales\Eshop\Application\Model\Manufacturer $oManufacturer Manufacturer object @return array
[ "Loads", "and", "returns", "article", "list", "of", "active", "Manufacturer", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ManufacturerListController.php#L136-L155
train
OXID-eSales/oxideshop_ce
source/Application/Controller/ManufacturerListController.php
ManufacturerListController.getActiveCategory
public function getActiveCategory() { if ($this->_oActCategory === null) { $this->_oActCategory = false; if (($oManufacturerTree = $this->getManufacturerTree())) { if ($oManufacturer = $this->getActManufacturer()) { $this->_oActCategory = $oManufacturer; } } } return $this->_oActCategory; }
php
public function getActiveCategory() { if ($this->_oActCategory === null) { $this->_oActCategory = false; if (($oManufacturerTree = $this->getManufacturerTree())) { if ($oManufacturer = $this->getActManufacturer()) { $this->_oActCategory = $oManufacturer; } } } return $this->_oActCategory; }
[ "public", "function", "getActiveCategory", "(", ")", "{", "if", "(", "$", "this", "->", "_oActCategory", "===", "null", ")", "{", "$", "this", "->", "_oActCategory", "=", "false", ";", "if", "(", "(", "$", "oManufacturerTree", "=", "$", "this", "->", "...
Template variable getter. Returns active Manufacturer @return object
[ "Template", "variable", "getter", ".", "Returns", "active", "Manufacturer" ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Controller/ManufacturerListController.php#L300-L312
train
OXID-eSales/oxideshop_ce
source/Application/Model/BasketContentMarkGenerator.php
BasketContentMarkGenerator._formMarks
private function _formMarks($sCurrentMark) { $oBasket = $this->_getBasket(); $aMarks = []; if ($oBasket->hasSkipedDiscount()) { $aMarks['skippedDiscount'] = $sCurrentMark; $sCurrentMark .= '*'; } if ($oBasket->hasArticlesWithDownloadableAgreement()) { $aMarks['downloadable'] = $sCurrentMark; $sCurrentMark .= '*'; } if ($oBasket->hasArticlesWithIntangibleAgreement()) { $aMarks['intangible'] = $sCurrentMark; } return $aMarks; }
php
private function _formMarks($sCurrentMark) { $oBasket = $this->_getBasket(); $aMarks = []; if ($oBasket->hasSkipedDiscount()) { $aMarks['skippedDiscount'] = $sCurrentMark; $sCurrentMark .= '*'; } if ($oBasket->hasArticlesWithDownloadableAgreement()) { $aMarks['downloadable'] = $sCurrentMark; $sCurrentMark .= '*'; } if ($oBasket->hasArticlesWithIntangibleAgreement()) { $aMarks['intangible'] = $sCurrentMark; } return $aMarks; }
[ "private", "function", "_formMarks", "(", "$", "sCurrentMark", ")", "{", "$", "oBasket", "=", "$", "this", "->", "_getBasket", "(", ")", ";", "$", "aMarks", "=", "[", "]", ";", "if", "(", "$", "oBasket", "->", "hasSkipedDiscount", "(", ")", ")", "{",...
Forms marks for articles. @param string $sCurrentMark Current mark. @return array
[ "Forms", "marks", "for", "articles", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/BasketContentMarkGenerator.php#L78-L95
train
OXID-eSales/oxideshop_ce
source/Application/Model/MdVariant.php
MdVariant.getMinDPrice
public function getMinDPrice() { $dMinPrice = $this->getDPrice(); $aVariants = $this->getMdSubvariants(); foreach ($aVariants as $oVariant) { $dMinVariantPrice = $oVariant->getMinDPrice(); if (is_null($dMinPrice)) { $dMinPrice = $dMinVariantPrice; } if (!is_null($dMinVariantPrice) && $dMinVariantPrice < $dMinPrice) { $dMinPrice = $dMinVariantPrice; } } return $dMinPrice; }
php
public function getMinDPrice() { $dMinPrice = $this->getDPrice(); $aVariants = $this->getMdSubvariants(); foreach ($aVariants as $oVariant) { $dMinVariantPrice = $oVariant->getMinDPrice(); if (is_null($dMinPrice)) { $dMinPrice = $dMinVariantPrice; } if (!is_null($dMinVariantPrice) && $dMinVariantPrice < $dMinPrice) { $dMinPrice = $dMinVariantPrice; } } return $dMinPrice; }
[ "public", "function", "getMinDPrice", "(", ")", "{", "$", "dMinPrice", "=", "$", "this", "->", "getDPrice", "(", ")", ";", "$", "aVariants", "=", "$", "this", "->", "getMdSubvariants", "(", ")", ";", "foreach", "(", "$", "aVariants", "as", "$", "oVaria...
Returns min price recursively selected from full subvariant tree. @return double
[ "Returns", "min", "price", "recursively", "selected", "from", "full", "subvariant", "tree", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/MdVariant.php#L223-L238
train
OXID-eSales/oxideshop_ce
source/Application/Model/MdVariant.php
MdVariant.getMaxDepth
public function getMaxDepth() { $aSubvariants = $this->getMdSubvariants(); if (!count($aSubvariants)) { return 0; } $iMaxDepth = 0; foreach ($aSubvariants as $oSubvariant) { if ($oSubvariant->getMaxDepth() > $iMaxDepth) { $iMaxDepth = $oSubvariant->getMaxDepth(); } } return $iMaxDepth + 1; }
php
public function getMaxDepth() { $aSubvariants = $this->getMdSubvariants(); if (!count($aSubvariants)) { return 0; } $iMaxDepth = 0; foreach ($aSubvariants as $oSubvariant) { if ($oSubvariant->getMaxDepth() > $iMaxDepth) { $iMaxDepth = $oSubvariant->getMaxDepth(); } } return $iMaxDepth + 1; }
[ "public", "function", "getMaxDepth", "(", ")", "{", "$", "aSubvariants", "=", "$", "this", "->", "getMdSubvariants", "(", ")", ";", "if", "(", "!", "count", "(", "$", "aSubvariants", ")", ")", "{", "return", "0", ";", "}", "$", "iMaxDepth", "=", "0",...
Gets max subvariant depth. 0 means no deeper subvariants. @return int
[ "Gets", "max", "subvariant", "depth", ".", "0", "means", "no", "deeper", "subvariants", "." ]
acd72f4a7c5c7340d70b191e081e4a24b74887cc
https://github.com/OXID-eSales/oxideshop_ce/blob/acd72f4a7c5c7340d70b191e081e4a24b74887cc/source/Application/Model/MdVariant.php#L245-L261
train