idx
int64
0
60.3k
question
stringlengths
101
6.21k
target
stringlengths
7
803
35,900
protected function _insert ( ) { $ this -> oxnewssubscribed__oxsubscribed = new \ OxidEsales \ Eshop \ Core \ Field ( date ( 'Y-m-d H:i:s' ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; return parent :: _insert ( ) ; }
Inserts nbews object data to DB . Returns true on success .
35,901
protected function _update ( ) { if ( ( $ this -> _blWasSubscribed || $ this -> _blWasPreSubscribed ) && ! $ this -> oxnewssubscribed__oxdboptin -> value ) { $ this -> oxnewssubscribed__oxunsubscribed -> setValue ( date ( 'Y-m-d H:i:s' ) ) ; $ aSkipSaveFieldsKeys = array_keys ( $ this -> _aSkipSaveFields , 'oxunsubscri...
We need to check if we unsubscribe here
35,902
public function setOptInStatus ( $ iStatus ) { $ this -> oxnewssubscribed__oxdboptin = new \ OxidEsales \ Eshop \ Core \ Field ( $ iStatus , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ this -> save ( ) ; }
Newsletter subscription status setter
35,903
public function setOptInEmailStatus ( $ iStatus ) { $ this -> oxnewssubscribed__oxemailfailed = new \ OxidEsales \ Eshop \ Core \ Field ( $ iStatus , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; $ this -> save ( ) ; }
Newsletter subscription email sending status setter
35,904
protected function _getContentList ( ) { if ( ! $ this -> _oContentList ) { $ this -> _oContentList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ContentList :: class ) ; } return $ this -> _oContentList ; }
Returns content list object .
35,905
public function loadCatMenues ( ) { $ this -> _load ( self :: TYPE_CATEGORY_MENU ) ; $ aArray = [ ] ; if ( $ this -> count ( ) ) { foreach ( $ this as $ oContent ) { if ( ! isset ( $ aArray [ $ oContent -> getCategoryId ( ) ] ) ) { $ aArray [ $ oContent -> getCategoryId ( ) ] = [ ] ; } $ aArray [ $ oContent -> oxconten...
Load Array of Menue items and change keys of aList to catid
35,906
protected function _extractListToArray ( ) { $ aExtractedContents = [ ] ; foreach ( $ this as $ oContent ) { $ aExtractedContents [ $ oContent -> getLoadId ( ) ] = $ oContent ; } $ this -> _aArray = $ aExtractedContents ; }
Extract oxContentList object to associative array with oxloadid as keys .
35,907
protected function _getSQLByType ( $ iType ) { $ sSQLAdd = '' ; $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sSQLType = " AND `oxtype` = " . $ oDb -> quote ( $ iType ) ; if ( $ iType == self :: TYPE_CATEGORY_MENU ) { $ sSQLAdd = " AND `oxcatid` IS NOT NULL AND `oxsnippet` = '0'" ; } if ( $ iT...
Creates SQL by type .
35,908
public function getSimilarRecommLists ( ) { $ aArticleIds = $ this -> getViewParameter ( "aArticleIds" ) ; $ oRecommList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ RecommendationList :: class ) ; return $ oRecommList -> getRecommListsByIds ( $ aArticleIds ) ; }
Returns similar recommendation list .
35,909
public function getCurrencyCovIndex ( ) { if ( $ this -> _dConvIndex === null ) { $ oCur = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getActShopCurrencyObject ( ) ; $ this -> _dConvIndex = 1 / $ oCur -> rate ; } return $ this -> _dConvIndex ; }
Template variable getter . Returns currency conversion index value
35,910
public function getIPaymentBasket ( ) { if ( $ this -> _dIPaymentBasket === null ) { $ this -> _dIPaymentBasket = $ this -> getBasket ( ) -> getPrice ( ) -> getBruttoPrice ( ) * 100 ; } return $ this -> _dIPaymentBasket ; }
Template variable getter . Returns ipayment basket price
35,911
public function getIPaymentAccount ( ) { if ( $ this -> _sIPaymentAccount === null ) { $ this -> _sIPaymentAccount = false ; $ this -> _sIPaymentAccount = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iShopID_iPayment_Account' ) ; } return $ this -> _sIPaymentAccount ; }
Template variable getter . Returns ipayment account
35,912
public function getIPaymentUser ( ) { if ( $ this -> _sIPaymentUser === null ) { $ this -> _sIPaymentUser = false ; $ this -> _sIPaymentUser = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iShopID_iPayment_User' ) ; } return $ this -> _sIPaymentUser ; }
Template variable getter . Returns ipayment user name
35,913
public function getIPaymentPassword ( ) { if ( $ this -> _sIPaymentPassword === null ) { $ this -> _sIPaymentPassword = false ; $ this -> _sIPaymentPassword = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iShopID_iPayment_Passwort' ) ; } return $ this -> _sIPaymentPassword ; }
Template variable getter . Returns ipayment password
35,914
public function getMailError ( ) { if ( $ this -> _sMailError === null ) { $ this -> _sMailError = false ; $ this -> _sMailError = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'mailerror' ) ; } return $ this -> _sMailError ; }
Template variable getter . Returns mail error
35,915
public function getOrder ( ) { if ( $ this -> _oOrder === null ) { $ this -> _oOrder = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Order :: class ) ; if ( $ sOrderId = $ this -> getBasket ( ) -> getOrderId ( ) ) { $ this -> _oOrder -> load ( $ sOrderId ) ; } } return $ this -> _oOrder ; }
Template variable getter . Returns order
35,916
public function getCountryISO3 ( ) { $ oOrder = $ this -> getOrder ( ) ; if ( $ oOrder ) { $ oCountry = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Country :: class ) ; $ oCountry -> load ( $ oOrder -> oxorder__oxbillcountryid -> value ) ; return $ oCountry -> oxcountry__oxisoalpha3 -> value ; } }
Template variable getter . Returns country ISO 3
35,917
protected function _buildSelectString ( $ oObject = null ) { $ sArtTable = getViewName ( 'oxarticles' , $ this -> _iEditLang ) ; $ sQ = "select oxreviews.oxid, oxreviews.oxcreate, oxreviews.oxtext, oxreviews.oxobjectid, {$sArtTable}.oxparentid, {$sArtTable}.oxtitle as oxtitle, {$sArtTable}.oxvarselect as oxvarselect, o...
Returns select query string
35,918
protected function _prepareWhereQuery ( $ aWhere , $ sSql ) { $ sSql = parent :: _prepareWhereQuery ( $ aWhere , $ sSql ) ; $ sArtTable = getViewName ( 'oxarticles' , $ this -> _iEditLang ) ; $ sArtTitleField = "{$sArtTable}.oxtitle" ; if ( $ this -> _aWhere [ $ sArtTitleField ] ) { $ sSqlForTitle = " (CONCAT( {$sArtTa...
Adds filtering conditions to query string
35,919
public function setSorting ( ) { $ sSelId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'oxid' ) ; $ sQuotedSelectionId = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quote ( $ sSelId ) ; $ sSelect = "select * from oxobject2selectlist where oxobjectid= {$sQuotedSel...
Applies sorting for selection lists
35,920
public function normalizeData ( array $ data ) : array { $ normalizedMetaData = [ ] ; foreach ( $ data as $ key => $ value ) { $ normalizedKey = strtolower ( $ key ) ; $ normalizedValue = $ this -> normalizeValues ( $ normalizedKey , $ value ) ; $ normalizedMetaData [ $ normalizedKey ] = $ normalizedValue ; } return $ ...
Normalize the array aModule in metadata . php
35,921
public function deleteEntry ( ) { $ oVoucherSerie = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ VoucherSerie :: class ) ; $ oVoucherSerie -> load ( $ this -> getEditObjectId ( ) ) ; $ oVoucherSerie -> deleteVoucherList ( ) ; parent :: deleteEntry ( ) ; }
Deletes selected Voucherserie .
35,922
public function getOrderList ( ) { if ( $ this -> _aOrderList === null ) { $ this -> _aOrderList = [ ] ; if ( $ oUser = $ this -> getUser ( ) ) { $ iNrofCatArticles = ( int ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iNrofCatArticles' ) ; $ iNrofCatArticles = $ iNrofCatArticles ? $ iN...
Template variable getter . Returns orders
35,923
public function getOrderArticleList ( ) { if ( $ this -> _aArticlesList === null ) { $ this -> _aArticlesList = false ; $ oOrdersList = $ this -> getOrderList ( ) ; if ( $ oOrdersList && $ oOrdersList -> count ( ) ) { $ this -> _aArticlesList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ArticleList :: class )...
Template variable getter . Returns ordered articles
35,924
public function getPageNavigation ( ) { if ( $ this -> _oPageNavigation === null ) { $ this -> _oPageNavigation = $ this -> generatePageNavigation ( ) ; } return $ this -> _oPageNavigation ; }
Template variable getter . Returns page navigation
35,925
public function updateViews ( ) { if ( \ OxidEsales \ Eshop \ Core \ Registry :: getSession ( ) -> getVariable ( "malladmin" ) ) { $ oMetaData = oxNew ( \ OxidEsales \ Eshop \ Core \ DbMetaDataHandler :: class ) ; $ this -> _aViewData [ "blViewSuccess" ] = $ oMetaData -> updateViews ( ) ; } }
Performs full view update
35,926
protected function _processFiles ( ) { if ( isset ( $ _FILES [ 'myfile' ] [ 'name' ] ) ) { foreach ( $ _FILES [ 'myfile' ] [ 'name' ] as $ key => $ value ) { $ aSource = $ _FILES [ 'myfile' ] [ 'tmp_name' ] ; $ sSource = $ aSource [ $ key ] ; $ value = strtolower ( $ value ) ; $ aFilename = explode ( "." , $ value ) ; ...
Processes files containing SQL queries
35,927
public function render ( ) { parent :: render ( ) ; $ soxId = $ this -> getEditObjectId ( ) ; $ sSLViewName = getViewName ( 'oxselectlist' ) ; $ oAllSel = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ ListModel :: class ) ; $ oAllSel -> init ( "oxselectlist" ) ; $ sQ = "select * from $sSLViewName" ; $ oAllSel -> select...
Loads article variants data passes it to Smarty engine and returns name of template file article_variant . tpl .
35,928
public function savevariant ( $ sOXID = null , $ aParams = null ) { if ( ! isset ( $ sOXID ) && ! isset ( $ aParams ) ) { $ sOXID = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "voxid" ) ; $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "e...
Saves article variant .
35,929
protected function _isAnythingChanged ( $ oProduct , $ aData ) { if ( ! is_array ( $ aData ) ) { return true ; } foreach ( $ aData as $ sKey => $ sValue ) { if ( isset ( $ oProduct -> $ sKey ) && $ oProduct -> $ sKey -> value != $ aData [ $ sKey ] ) { return true ; } } return false ; }
Checks if anything is changed in given data compared with existing product values .
35,930
protected function _getProductParent ( $ sParentId ) { if ( $ this -> _oProductParent === null || ( $ this -> _oProductParent !== false && $ this -> _oProductParent -> getId ( ) != $ sParentId ) ) { $ this -> _oProductParent = false ; $ oProduct = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ...
Returns variant parent object
35,931
public function savevariants ( ) { $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; if ( is_array ( $ aParams ) ) { foreach ( $ aParams as $ soxId => $ aVarParams ) { $ this -> savevariant ( $ soxId , $ aVarParams ) ; } } $ this -> resetContentCache ( ) ; }
Saves all article variants at once .
35,932
public function deleteVariant ( ) { $ editObjectOxid = $ this -> getEditObjectId ( ) ; $ editObject = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ editObject -> load ( $ editObjectOxid ) ; if ( $ editObject -> isDerived ( ) ) { return ; } $ this -> resetContentCache ( ) ; $ variantOxid = ...
Deletes article variant .
35,933
public function changename ( ) { $ soxId = $ this -> getEditObjectId ( ) ; $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; $ this -> resetContentCache ( ) ; $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; if ( $ soxId != "...
Changes name of variant .
35,934
public function addsel ( ) { $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; if ( $ oArticle -> load ( $ this -> getEditObjectId ( ) ) ) { if ( $ oArticle -> isDerived ( ) ) { return ; } $ this -> resetContentCache ( ) ; if ( $ aSels = \ OxidEsales \ Eshop \ Core \ Registry :: get...
Add selection list
35,935
public function getReviewUser ( ) { if ( $ this -> _oRevUser === null ) { $ this -> _oRevUser = false ; $ oUser = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ User :: class ) ; if ( $ sUserId = $ oUser -> getReviewUserId ( $ this -> getReviewUserHash ( ) ) ) { if ( $ oUser -> load ( $ sUserId ) ) { $ this -> _o...
Returns review user object
35,936
public function getActiveRecommList ( ) { if ( ! $ this -> getViewConfig ( ) -> getShowListmania ( ) ) { return false ; } if ( $ this -> _oActiveRecommList === null ) { $ this -> _oActiveRecommList = false ; if ( $ sRecommId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'recommid' )...
Template variable getter . Returns active recommlist
35,937
public function getActiveRecommItems ( ) { if ( $ this -> _oActiveRecommItems === null ) { $ this -> _oActiveRecommItems = false ; if ( $ oActiveRecommList = $ this -> getActiveRecommList ( ) ) { $ iActPage = ( int ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'pgNr' ) ; $ iActPage ...
Template variable getter . Returns active recommlist s items
35,938
protected function _getSqlSelectFieldsForTree ( $ sTable , $ aColumns = null ) { if ( $ aColumns && count ( $ aColumns ) ) { foreach ( $ aColumns as $ key => $ val ) { $ aColumns [ $ key ] .= ' as ' . $ val ; } return "$sTable." . implode ( ", $sTable." , $ aColumns ) ; } $ sFieldList = "$sTable.oxid as oxid, $sTable.o...
return fields to select while loading category tree
35,939
protected function _getSelectString ( $ blReverse = false , $ aColumns = null , $ sOrder = null ) { $ sViewName = $ this -> getBaseObject ( ) -> getViewName ( ) ; $ sFieldList = $ this -> _getSqlSelectFieldsForTree ( $ sViewName , $ aColumns ) ; if ( ! $ this -> isAdmin ( ) && ! $ this -> _blHideEmpty && ! $ this -> ge...
constructs the sql string to get the category list
35,940
protected function _getDepthSqlSnippet ( $ oCat ) { $ sViewName = $ this -> getBaseObject ( ) -> getViewName ( ) ; $ sDepthSnippet = ' ( 0' ; if ( $ oCat ) { $ sDepthSnippet .= " or ($sViewName.oxparentid = " . \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quote ( $ oCat -> oxcategories__oxid -> value ...
constructs the sql snippet responsible for depth optimizations loads only selected category s siblings
35,941
public function buildTree ( $ sActCat ) { startProfile ( "buildTree" ) ; $ this -> _sActCat = $ sActCat ; $ this -> load ( ) ; if ( ! $ this -> isAdmin ( ) ) { $ this -> _ppRemoveInactiveCategories ( ) ; $ this -> _ppLoadFullCategory ( $ sActCat ) ; $ this -> _ppAddPathInfo ( ) ; $ this -> _ppAddContentCategories ( ) ;...
Fetches reversed raw categories and does all necessary postprocessing for removing invisible or forbidden categories building oc navigation path adding content categories and building tree structure .
35,942
protected function _ppLoadFullCategory ( $ sId ) { if ( isset ( $ this -> _aArray [ $ sId ] ) ) { $ oNewCat = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Category :: class ) ; if ( $ oNewCat -> load ( $ sId ) ) { $ this -> _aArray [ $ sId ] = $ oNewCat ; } } else { $ this -> _sActCat = null ; } }
set full category object in tree
35,943
public function loadList ( ) { startProfile ( 'buildCategoryList' ) ; $ this -> setLoadFull ( true ) ; $ this -> selectString ( $ this -> _getSelectString ( false , null , 'oxparentid, oxsort, oxtitle' ) ) ; $ this -> _ppBuildTree ( ) ; $ this -> _ppAddDepthInformation ( ) ; stopProfile ( 'buildCategoryList' ) ; }
Fetches raw categories and does postprocessing for adding depth information
35,944
protected function _ppRemoveInactiveCategories ( ) { $ aRemoveList = [ ] ; foreach ( $ this -> _aArray as $ sId => $ oCat ) { if ( $ oCat -> oxcategories__oxppremove -> value ) { if ( ! isset ( $ aRemoveList [ $ oCat -> oxcategories__oxrootid -> value ] ) ) { $ aRemoveList [ $ oCat -> oxcategories__oxrootid -> value ] ...
Category list postprocessing routine responsible for removal of inactive of forbidden categories and subcategories .
35,945
protected function _ppAddPathInfo ( ) { if ( is_null ( $ this -> _sActCat ) ) { return ; } $ aPath = [ ] ; $ sCurrentCat = $ this -> _sActCat ; while ( $ sCurrentCat != 'oxrootid' && isset ( $ this [ $ sCurrentCat ] ) ) { $ oCat = $ this [ $ sCurrentCat ] ; $ oCat -> setExpanded ( true ) ; $ aPath [ $ sCurrentCat ] = $...
Category list postprocessing routine responsible for generation of active category path
35,946
protected function _ppAddContentCategories ( ) { $ oContentList = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ ContentList :: class ) ; $ oContentList -> loadCatMenues ( ) ; foreach ( $ oContentList as $ sCatId => $ aContent ) { if ( array_key_exists ( $ sCatId , $ this -> _aArray ) ) { $ this [ $ sCatId ] -> s...
Category list postprocessing routine responsible adding of content categories
35,947
protected function _ppBuildTree ( ) { $ aTree = [ ] ; foreach ( $ this -> _aArray as $ oCat ) { $ sParentId = $ oCat -> oxcategories__oxparentid -> value ; if ( $ sParentId != 'oxrootid' ) { if ( isset ( $ this -> _aArray [ $ sParentId ] ) ) { $ this -> _aArray [ $ sParentId ] -> setSubCat ( $ oCat , $ oCat -> getId ( ...
Category list postprocessing routine responsible building an sorting of hierarchical category tree
35,948
protected function _ppAddDepthInformation ( ) { $ aTree = [ ] ; foreach ( $ this -> _aArray as $ oCat ) { $ aTree [ $ oCat -> getId ( ) ] = $ oCat ; $ aSubCats = $ oCat -> getSubCats ( ) ; if ( count ( $ aSubCats ) > 0 ) { foreach ( $ aSubCats as $ oSubCat ) { $ aTree = $ this -> _addDepthInfo ( $ aTree , $ oSubCat ) ;...
Category list postprocessing routine responsible for making flat category tree and adding depth information . Requires reversed category list!
35,949
protected function _addDepthInfo ( $ aTree , $ oCat , $ sDepth = "" ) { $ sDepth .= "-" ; $ oCat -> oxcategories__oxtitle -> setValue ( $ sDepth . ' ' . $ oCat -> oxcategories__oxtitle -> value ) ; $ aTree [ $ oCat -> getId ( ) ] = $ oCat ; $ aSubCats = $ oCat -> getSubCats ( ) ; if ( count ( $ aSubCats ) > 0 ) { forea...
Recursive function to add depth information
35,950
public function updateCategoryTree ( $ blVerbose = true , $ sShopID = null ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ database -> startTransaction ( ) ; try { $ sWhere = $ this -> getInitialUpdateCategoryTreeCondition ( $ blVerbose ) ; $ database -> execute ( "update oxcategories s...
Rebuilds nested sets information by updating oxLeft and oxRight category attributes from oxParentId
35,951
protected function _prepareWhereQuery ( $ whereQuery , $ fullQuery ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ query = parent :: _prepareWhereQuery ( $ whereQuery , $ fullQuery ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ folders = $ config -> getConfig...
Adding folder check
35,952
public function getControllerMap ( ) { $ controllerMap = [ ] ; $ moduleControllersByModuleId = Registry :: getUtilsObject ( ) -> getModuleVar ( ClassProviderStorage :: STORAGE_KEY ) ; if ( is_array ( $ moduleControllersByModuleId ) ) { $ controllerMap = $ this -> flattenControllersMap ( $ moduleControllersByModuleId ) ...
Get the controller map of the modules .
35,953
public static function get ( ) { $ database = DatabaseProvider :: getDb ( ) ; $ r = new \ ReflectionMethod ( Database :: class , 'getConnection' ) ; $ r -> setAccessible ( true ) ; return $ r -> invoke ( $ database ) ; }
Uses reflection to fetch the database connection from the DatabaseProvider .
35,954
public function getProductId ( ) { if ( $ this -> _sProductId === null ) { $ this -> _sProductId = $ this -> getProduct ( ) -> getId ( ) ; } return $ this -> _sProductId ; }
Template variable getter . Returns current product id
35,955
public function getActPictureId ( ) { if ( $ this -> _sActPicId === null ) { $ this -> _sActPicId = false ; $ aPicGallery = $ this -> getProduct ( ) -> getPictureGallery ( ) ; if ( $ aPicGallery [ 'ZoomPic' ] ) { $ sActPicId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'actpicid' )...
Template variable getter . Returns active picture id
35,956
public function getArtZoomPics ( ) { if ( $ this -> _aArtZoomPics === null ) { $ this -> _aArtZoomPics = false ; $ aPicGallery = $ this -> getProduct ( ) -> getPictureGallery ( ) ; $ blArtPic = $ aPicGallery [ 'ZoomPic' ] ; $ aArtPics = $ aPicGallery [ 'ZoomPics' ] ; if ( $ blArtPic ) { $ this -> _aArtZoomPics = $ aArt...
Template variable getter . Returns article zoom pictures
35,957
public function getProduct ( ) { if ( $ this -> _oProduct === null ) { $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ oArticle -> load ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'anid' ) ) ; $ this -> _oProduct = $ oArticle ; } return $ t...
Template variable getter . Returns active product
35,958
public function getExpanded ( ) { if ( ! isset ( $ this -> _blExpanded ) ) { $ this -> _blExpanded = ( $ this -> getId ( ) == \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'oxcid' ) ) ; } return $ this -> _blExpanded ; }
Returns the expanded state of the content category .
35,959
protected function _loadFromDb ( $ sLoadId ) { $ sTable = $ this -> getViewName ( ) ; $ sShopId = $ this -> getShopId ( ) ; $ aParams = [ $ sTable . '.oxloadid' => $ sLoadId , $ sTable . '.oxshopid' => $ sShopId ] ; $ sSelect = $ this -> buildSelectString ( $ aParams ) ; if ( $ sLoadId == 'oxcredits' ) { $ sColQ = "SHO...
Get data from db .
35,960
public function loadByIdent ( $ loadId , $ onlyActive = false ) { return $ this -> assignContentData ( $ this -> _loadFromDb ( $ loadId ) , $ onlyActive ) ; }
Loads Content by using field oxloadid instead of oxid .
35,961
protected function assignContentData ( $ fetchedContent , $ onlyActive = false ) { $ filteredContent = $ this -> filterInactive ( $ fetchedContent , $ onlyActive ) ; if ( ! is_null ( $ filteredContent ) ) { $ this -> assign ( $ filteredContent ) ; return true ; } return false ; }
Assign content data filter inactive if needed .
35,962
protected function filterInactive ( $ data , $ checkIfActive = false ) { return $ data && ( ! $ checkIfActive || ( $ checkIfActive && $ data [ 'OXACTIVE' ] ) == '1' ) ? $ data : null ; }
Decide if content item can be loaded by checking item activity if needed
35,963
public function assign ( $ dbRecord ) { parent :: assign ( $ dbRecord ) ; if ( $ this -> oxcontents__oxcontent ) { $ this -> oxcontents__oxcontent -> setValue ( str_replace ( '&lang=' , '&lang=' , $ this -> oxcontents__oxcontent -> value ) , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; } }
Replace the &amp ; into & and call base class .
35,964
final public function addVersionTags ( $ sOutput ) { $ sVersion = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getVersion ( ) ; $ sEdition = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getFullEdition ( ) ; $ sCurYear = date ( "Y" ) ; $ aVersion = explode ( '.' , $ sVersion ) ; $ sMajorVersi...
Add a version tag to a html page
35,965
public function flushOutput ( ) { switch ( $ this -> _sOutputFormat ) { case self :: OUTPUT_FORMAT_JSON : echo getStr ( ) -> jsonEncode ( $ this -> _aBuffer ) ; break ; case self :: OUTPUT_FORMAT_HTML : default : break ; } }
flush pending output
35,966
public function getNews ( ) { if ( $ this -> _oNewsList === null ) { $ this -> _oNewsList = false ; $ iPerPage = ( int ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iNrofCatArticles' ) ; $ iPerPage = $ iPerPage ? $ iPerPage : 10 ; $ oActNews = oxNew ( \ OxidEsales \ Eshop \ Application ...
Template variable getter . Returns newslist
35,967
public function getOxMessage ( ) { $ translatedMessage = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> translateString ( $ this -> _sMessage ) ; if ( ! empty ( $ this -> _aFormatParameters ) ) { $ translatedMessage = vsprintf ( $ translatedMessage , $ this -> _aFormatParameters ) ; } return $ translatedMessa...
Formats message using vsprintf if property _aFormatParameters was set and returns translated message .
35,968
public function getActiveCategory ( ) { $ oCategory = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getTopActiveView ( ) -> getActiveCategory ( ) ; if ( $ oCategory ) { $ this -> setActiveCategory ( $ oCategory ) ; } return $ this -> _oActCategory ; }
Returns active category
35,969
public function render ( ) { parent :: render ( ) ; $ sWidgetType = $ this -> getViewParameter ( 'sWidgetType' ) ; $ sListType = $ this -> getViewParameter ( 'sListType' ) ; if ( $ sWidgetType && $ sListType ) { $ this -> _sTemplate = "widget/" . $ sWidgetType . "/" . $ sListType . ".tpl" ; } $ sForceTemplate = $ this ...
Renders template based on widget type or just use directly passed path of template
35,970
public function getProduct ( ) { if ( is_null ( $ this -> _oArticle ) ) { if ( $ this -> getViewParameter ( '_object' ) ) { $ oArticle = $ this -> getViewParameter ( '_object' ) ; } else { $ sAddDynParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getTopActiveView ( ) -> getAddUrlParams ( ) ; $ sAddDy...
Get product article
35,971
public function getLink ( $ iLang = null ) { return \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getTopActiveView ( ) -> getLink ( $ iLang ) ; }
get link of current top view
35,972
protected function _addDynParamsToLink ( $ sAddDynParams , $ oArticle ) { $ blAddedParams = false ; if ( $ sAddDynParams ) { $ blSeo = \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> seoIsActive ( ) ; if ( ! $ blSeo ) { $ oArticle -> appendStdLink ( $ sAddDynParams ) ; } $ oArticle -> appendLink ( $ sAddDynPa...
Appends dyn params to url .
35,973
protected function _getArticleById ( $ sArticleId ) { $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ oArticle -> load ( $ sArticleId ) ; $ iLinkType = $ this -> getViewParameter ( 'iLinkType' ) ; if ( $ this -> getViewParameter ( 'inlist' ) ) { $ oArticle -> setInList ( ) ; } i...
Returns prepared article by id .
35,974
public function save ( ) { parent :: save ( ) ; $ soxId = $ this -> getEditObjectId ( ) ; $ aSerieParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; $ oVoucherSerie = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ VoucherSerie :: class ) ; if ( $ soxId != "-1" ...
Saves main Voucherserie parameters changes .
35,975
protected function _getVoucherSerie ( ) { if ( $ this -> _oVoucherSerie == null ) { $ oVoucherSerie = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ VoucherSerie :: class ) ; $ sId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "voucherid" ) ; if ( $ oVoucherSerie -> load ( $ s...
Returns voucher serie object
35,976
public function systemReq ( ) { $ systemRequirementsInfo = $ this -> getSystemRequirementsInfo ( ) ; $ moduleStateMapGenerator = $ this -> getModuleStateMapGenerator ( $ systemRequirementsInfo ) ; $ moduleStateMap = $ moduleStateMapGenerator -> getModuleStateMap ( ) ; $ isSafeForSetupToContinue = SystemRequirements :: ...
First page with system requirements check
35,977
public function license ( ) { $ languageId = $ this -> getLanguageInstance ( ) -> getLanguage ( ) ; $ utils = $ this -> getUtilitiesInstance ( ) ; $ this -> setViewOptions ( 'license.php' , 'STEP_2_TITLE' , [ "aLicenseText" => $ utils -> getLicenseContent ( $ languageId ) ] ) ; }
License confirmation page
35,978
public function dbInfo ( ) { $ view = $ this -> getView ( ) ; $ session = $ this -> getSessionInstance ( ) ; $ systemRequirements = getSystemReqCheck ( ) ; $ utilities = $ this -> getUtilitiesInstance ( ) ; $ eulaOptionValue = $ utilities -> getRequestVar ( "iEula" , "post" ) ; $ eulaOptionValue = ( int ) ( $ eulaOptio...
DB info entry page
35,979
public function dirsInfo ( ) { $ session = $ this -> getSessionInstance ( ) ; $ setup = $ this -> getSetupInstance ( ) ; if ( $ this -> userDecidedOverwriteDB ( ) ) { $ session -> setSessionParam ( 'blOverwrite' , true ) ; } if ( $ this -> userDecidedIgnoreDBWarning ( ) ) { $ session -> setSessionParam ( 'blIgnoreDbRec...
Setup paths info entry page
35,980
public function dbConnect ( ) { $ setup = $ this -> getSetupInstance ( ) ; $ session = $ this -> getSessionInstance ( ) ; $ language = $ this -> getLanguageInstance ( ) ; $ view = $ this -> getView ( ) ; $ view -> setTitle ( 'STEP_3_1_TITLE' ) ; $ databaseConfigValues = $ this -> getUtilitiesInstance ( ) -> getRequestV...
Testing database connection
35,981
public function finish ( ) { $ session = $ this -> getSessionInstance ( ) ; $ pathCollection = $ session -> getSessionParam ( "aPath" ) ; $ aSetupConfig = $ session -> getSessionParam ( "aSetupConfig" ) ; $ aDB = $ session -> getSessionParam ( "aDB" ) ; try { $ this -> getUtilitiesInstance ( ) -> executeExternalRegener...
Final setup step
35,982
private function databaseCanBeOverwritten ( $ database ) { $ canBeOverwritten = true ; if ( ! $ this -> userDecidedOverwriteDB ( ) ) { $ canBeOverwritten = ! $ this -> getUtilitiesInstance ( ) -> checkDbExists ( $ database ) ; } return $ canBeOverwritten ; }
Check if database can be safely overwritten .
35,983
private function formMessageIfDBCanBeOverwritten ( $ databaseName , $ view , $ language ) { $ view -> setMessage ( sprintf ( $ language -> getText ( 'ERROR_DB_ALREADY_EXISTS' ) , $ databaseName ) ) ; }
Show warning - question if database with same name already exists .
35,984
private function installShopData ( $ database , $ demoDataRequired = 0 ) { $ baseSqlDir = $ this -> getUtilitiesInstance ( ) -> getSqlDirectory ( EditionSelector :: COMMUNITY ) ; try { if ( $ demoDataRequired && $ this -> getUtilitiesInstance ( ) -> isDemodataPrepared ( ) ) { $ this -> getUtilitiesInstance ( ) -> execu...
Installs demo data or initial dependent on parameter
35,985
protected function setViewOptions ( $ templateFileName , $ titleId , $ viewOptions ) { $ view = $ this -> getView ( ) ; $ view -> setTemplateFileName ( $ templateFileName ) ; $ view -> setTitle ( $ titleId ) ; foreach ( $ viewOptions as $ optionKey => $ optionValue ) { $ view -> setViewParam ( $ optionKey , $ optionVal...
Allows to set all necessary view information with single method call .
35,986
private function getModuleStateMapGenerator ( $ systemRequirementsInfo ) { $ setup = $ this -> getSetupInstance ( ) ; $ language = $ this -> getLanguageInstance ( ) ; $ moduleStateMapGenerator = new Controller \ ModuleStateMapGenerator ( $ systemRequirementsInfo ) ; $ moduleStateMapGenerator -> setModuleStateHtmlClassC...
Getter for ModuleStateMapGenerator .
35,987
private function ensureDatabasePresent ( $ database , $ dbName ) { try { $ database -> createDb ( $ dbName ) ; } catch ( Exception $ exception ) { $ setup = $ this -> getSetupInstance ( ) ; $ setup -> setNextStep ( $ setup -> getStep ( 'STEP_DB_INFO' ) ) ; $ this -> getView ( ) -> setMessage ( $ exception -> getMessage...
Ensure the database is available
35,988
public function render ( ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; parent :: render ( ) ; $ this -> _aViewData [ 'edit' ] = $ oArticle = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ soxId = $ this -> getEditObjectId ( ) ; if ( isset ( $ soxId ) && $ soxId ...
Loads article overview data passes to Smarty engine and returns name of template file article_overview . tpl .
35,989
protected function updateArticle ( $ article , $ oxId ) { $ article -> loadInLang ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editlanguage" ) , $ oxId ) ; return $ article ; }
Loads language for article object .
35,990
public static function classBelongsToShopUnifiedNamespace ( $ className ) { $ lcClassName = strtolower ( ltrim ( $ className , '\\' ) ) ; $ unifiedNamespace = static :: getUnifiedNamespace ( ) ; $ belongsToUnifiedNamespace = ( false !== strpos ( $ lcClassName , strtolower ( $ unifiedNamespace ) ) ) ; return $ belongsTo...
Check if given class belongs to a shop edition namespace .
35,991
private static function classBelongsToNamespace ( $ className , $ namespaces ) { $ belongsToNamespace = false ; $ check = array_values ( $ namespaces ) ; $ lcClassName = strtolower ( ltrim ( $ className , '\\' ) ) ; foreach ( $ check as $ namespace ) { if ( false !== strpos ( $ lcClassName , strtolower ( $ namespace ) ...
Check if given class belongs to one of the supplied namespaces .
35,992
public function deleteArticleMasterPicture ( $ oObject , $ iIndex , $ blDeleteMasterPicture = true ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ myUtilsPic = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsPic ( ) ; $ oUtilsFile = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsFile (...
Deletes master picture and all images generated from it . If third parameter is false skips master image delete only all generated images will be deleted .
35,993
public function deleteMainIcon ( $ oObject ) { if ( ( $ sMainIcon = $ oObject -> oxarticles__oxicon -> value ) ) { $ sPath = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getPictureDir ( false ) . \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsFile ( ) -> getImageDirByType ( "ICO" ) ; \ OxidEsales \ Esh...
Deletes custom main icon which name is specified in oxicon field .
35,994
public function deleteThumbnail ( $ oObject ) { if ( ( $ sThumb = $ oObject -> oxarticles__oxthumb -> value ) ) { $ sPath = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getPictureDir ( false ) . \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsFile ( ) -> getImageDirByType ( "TH" ) ; \ OxidEsales \ Eshop...
Deletes custom thumbnail which name is specified in oxthumb field .
35,995
public function deleteZoomPicture ( $ oObject , $ iIndex ) { $ oDbHandler = oxNew ( \ OxidEsales \ Eshop \ Core \ DbMetaDataHandler :: class ) ; $ iZoomPicCount = ( int ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'iZoomPicCount' ) ; if ( $ iIndex > $ iZoomPicCount || ! $ oDbHandler -> ...
Deletes custom zoom picture which name is specified in oxzoom field .
35,996
public function getImageSize ( $ aImgSizes , $ sIndex = null ) { $ aSize = [ ] ; if ( isset ( $ sIndex ) && is_array ( $ aImgSizes ) && isset ( $ aImgSizes [ $ sIndex ] ) ) { $ aSize = explode ( '*' , $ aImgSizes [ $ sIndex ] ) ; } elseif ( is_string ( $ aImgSizes ) ) { $ aSize = explode ( '*' , $ aImgSizes ) ; } if ( ...
Returns image sizes from provided config array
35,997
public function getAltImageUrl ( $ sFilePath , $ sFile , $ blSSL = null ) { $ oConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ sAltUrl = $ oConfig -> getConfigParam ( 'sAltImageUrl' ) ; if ( ! $ sAltUrl ) { $ sAltUrl = $ oConfig -> getConfigParam ( 'sAltImageDir' ) ; } if ( $ sAltUrl ) { if ( ( is_...
Returns alternative image url
35,998
public function getPicUrl ( $ sPath , $ sFile , $ sSize , $ sIndex = null , $ sAltPath = false , $ bSsl = null ) { $ sUrl = null ; if ( $ sPath && $ sFile && ( $ aSize = $ this -> getImageSize ( $ sSize , $ sIndex ) ) ) { $ aPicInfo = $ this -> _getPictureInfo ( "master/" . ( $ sAltPath ? $ sAltPath : $ sPath ) , $ sFi...
Returns requested picture url . If image is not available - returns false
35,999
public function getProductPicUrl ( $ sPath , $ sFile , $ sSize , $ sIndex = null , $ bSsl = null ) { $ sUrl = null ; if ( ! $ sFile || ! ( $ sUrl = $ this -> getPicUrl ( $ sPath , $ sFile , $ sSize , $ sIndex , false , $ bSsl ) ) ) { $ sUrl = $ this -> getPicUrl ( $ sPath , "nopic.jpg" , $ sSize , $ sIndex , "/" , $ bS...
Returns requested product picture url . If image is not available - returns url to nopic . jpg