OXID eShop CE
6.1.5
|
Public Member Functions | |
addLanguageParam ($sSeoUrl, $iLang) | |
__construct () | |
getDynamicObjectId ($iShopId, $sStdUrl) | |
encodeString ($sString, $blReplaceChars=true, $iLang=false) | |
setSeparator ($sSeparator=null) | |
setPrefix ($sPrefix) | |
setIdLength ($iIdlength=null) | |
setReservedWords ($aReservedWords) | |
markAsExpired ($sId, $iShopId=null, $iExpStat=1, $iLang=null, $sParams=null) | |
encodeStaticUrls ($aStaticUrl, $iShopId, $iLang) | |
copyStaticUrls ($iShopId) | |
getStaticUrl ($sStdUrl, $iLang=null, $iShopId=null) | |
addSeoEntry ($sObjectId, $iShopId, $iLang, $sStdUrl, $sSeoUrl, $sType, $blFixed=1, $sKeywords='', $sDescription='', $sParams='', $blExclude=false, $sAltObjectId=null) | |
deleteSeoEntry ($objectId, $shopId, $language, $type) | |
getMetaData ($sObjectId, $sMetaType, $iShopId=null, $iLang=null) | |
getDynamicUrl ($sStdUrl, $sSeoUrl, $iLang) | |
fetchSeoUrl ($standardUrl, $languageId=null) | |
Protected Member Functions | |
_processSeoUrl ($sSeoUrl, $sObjectId=null, $iLang=null, $blExclude=false) | |
_copyToHistory ($sId, $iShopId, $iLang, $sType=null, $sNewId=null) | |
_getDynamicUri ($sStdUrl, $sSeoUrl, $iLang) | |
_getFullUrl ($sSeoUrl, $iLang=null, $blSsl=false) | |
_getSeoIdent ($sSeoUrl) | |
_getStaticUri ($sStdUrl, $iShopId, $iLang) | |
_getUrlExtension () | |
_getUniqueSeoUrl ($sSeoUrl, $sObjectId=null, $iObjectLang=null) | |
_isFixed ($sType, $sId, $iLang, $iShopId=null, $sParams=null, $blStrictParamsCheck=true) | |
_getCacheKey ($sType, $iLang=null, $iShopId=null, $sParams=null) | |
_loadFromCache ($sCacheIdent, $sType, $iLang=null, $iShopId=null, $sParams=null) | |
_saveInCache ($sCacheIdent, $sCache, $sType, $iLang=null, $iShopId=null, $sParams=null) | |
_loadFromDb ($sType, $sId, $iLang, $iShopId=null, $sParams=null, $blStrictParamsCheck=true) | |
_getReservedEntryKeys () | |
_prepareUri ($sUri, $iLang=false) | |
_prepareTitle ($sTitle, $blSkipTruncate=false, $iLang=false) | |
_saveToDb ($sType, $sObjectId, $sStdUrl, $sSeoUrl, $iLang, $iShopId=null, $blFixed=null, $sParams=null) | |
executeQuery ($query) | |
_trimUrl ($sUrl, $iLang=null) | |
_getMaxUrlLength () | |
_getPageUri ($oObject, $sType, $sStdUrl, $sSeoUrl, $sParams, $iLang=null, $blFixed=false) | |
_getStaticObjectId ($iShopId, $sStdUrl) | |
_getAltUri ($sObjectId, $iLang) | |
executeDatabaseQuery ($query) | |
replaceSpecialChars ($stringWithSpecialChars) | |
assembleFullPageUrl ($object, $type, $stdUrl, $seoUrl, $pageNumber, $parameters, $languageId, $isFixed) | |
Protected Attributes | |
$_iIdLength = 255 | |
$_sAddParams = null | |
$_iMaxUrlLength = null | |
Static Protected Attributes | |
static | $_aReservedWords = ['admin'] |
static | $_aReservedEntryKeys = null |
static | $_sSeparator = null |
static | $_sPrefix = null |
static | $_aFixedCache = [] |
static | $_sCacheKey = null |
static | $_aCache = [] |
Seo encoder base
OxidEsales\EshopCommunity\Core\SeoEncoder::__construct | ( | ) |
SEO encoder constructor
|
protected |
Moves current seo record to seo history table
string | $sId | object id |
int | $iShopId | active shop id |
int | $iLang | object language |
string | $sType | object type (if you pass real object - type is not necessary) |
string | $sNewId | new object id, mostly used for static url updates (optional) |
|
protected |
Returns alternative uri used while updating seo
string | $sObjectId | object id |
int | $iLang | language id |
|
protected |
Returns cache key (in non admin mode)
string | $sType | object type |
int | $iLang | active language id |
mixed | $iShopId | active shop id |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
|
protected |
Returns dynamic object SEO URI
string | $sStdUrl | standard url |
string | $sSeoUrl | seo uri |
int | $iLang | active language |
|
protected |
Returns SEO url with shop's path + additional params ( \OxidEsales\Eshop\Core\SeoEncoder:: _getAddParams)
string | $sSeoUrl | seo URL |
int | $iLang | active language |
bool | $blSsl | forces to build ssl url |
|
protected |
Returns maximum seo/dynamic url length
|
protected |
Loads if exists or prepares and saves new seo url for passed object
\OxidEsales\Eshop\Core\Model\BaseModel | $oObject | object to prepare seo data |
string | $sType | type of object (oxvendor/oxcategory) |
string | $sStdUrl | stanradr url |
string | $sSeoUrl | seo uri |
string | $sParams | additional params, liek page number etc. mostly used by mysql for indexes |
int | $iLang | language |
bool | $blFixed | fixed url marker (default is false) |
|
protected |
cached getter: check root directory php file names for them not to be in 1st part of seo url because then apache will execute that php file instead of url parser
|
protected |
_getSeoIdent returns seo ident for db search
string | $sSeoUrl | seo url |
@access protected
|
protected |
Generates static url object id
int | $iShopId | shop id |
string | $sStdUrl | standard (dynamic) url |
|
protected |
Returns SEO static uri
string | $sStdUrl | standard page url |
int | $iShopId | active shop id |
int | $iLang | active language |
|
protected |
_getUniqueSeoUrl returns possibly modified url for not to be same as already existing in db
string | $sSeoUrl | seo url |
string | $sObjectId | current object id, used to skip self in query |
int | $iObjectLang | object language id |
@access protected
|
protected |
Returns target "extension"
|
protected |
check if seo url exist and is fixed
string | $sType | object type |
string | $sId | object identifier |
int | $iLang | active language id |
mixed | $iShopId | active shop id |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
bool | $blStrictParamsCheck | strict parameters check |
@access protected
|
protected |
Loads seo data from cache for active view (in non admin mode)
string | $sCacheIdent | cache identifier |
string | $sType | object type |
int | $iLang | active language id |
mixed | $iShopId | active shop id |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
|
protected |
_loadFromDb loads data from oxseo table if exists returns oxseo url
string | $sType | object type |
string | $sId | object identifier |
int | $iLang | active language id |
mixed | $iShopId | active shop id |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
bool | $blStrictParamsCheck | strict parameters check |
@access protected
|
protected |
Prepares and returns formatted object SEO id
string | $sTitle | Original object title |
bool | $blSkipTruncate | Truncate title into defined lenght or not |
int | $iLang | language ID, for which to prepare the title |
|
protected |
Makes safe seo uri - removes unsupported/reserved characters
string | $sUri | seo uri |
int | $iLang | language ID, for which URI should be prepared |
|
protected |
Processes seo url before saving to db:
string | $sSeoUrl | seo url to process |
string | $sObjectId | seo object id [optional] |
int | $iLang | active language id [optional] |
bool | $blExclude | exclude language prefix while building seo url |
|
protected |
Saves seo cache data for active view (in non admin mode)
string | $sCacheIdent | cache identifier |
string | $sCache | cacheable data |
string | $sType | object type |
int | $iLang | active language id |
mixed | $iShopId | active shop id |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
|
protected |
_saveToDb saves values to seo table
string | $sType | url type (static, dynamic, oxarticle etc) |
string | $sObjectId | object identifier |
string | $sStdUrl | standard url |
string | $sSeoUrl | seo url |
int | $iLang | active object language |
mixed | $iShopId | active object shop id |
bool | $blFixed | seo entry marker. if true, entry should not be automatically changed |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
@access protected
|
protected |
Removes shop path part and session id from given url
string | $sUrl | url to clean bad chars |
int | $iLang | active language |
@access protected
OxidEsales\EshopCommunity\Core\SeoEncoder::addLanguageParam | ( | $sSeoUrl, | |
$iLang | |||
) |
Returns part of url defining active language
string | $sSeoUrl | seo url |
int | $iLang | language id |
OxidEsales\EshopCommunity\Core\SeoEncoder::addSeoEntry | ( | $sObjectId, | |
$iShopId, | |||
$iLang, | |||
$sStdUrl, | |||
$sSeoUrl, | |||
$sType, | |||
$blFixed = 1 , |
|||
$sKeywords = '' , |
|||
$sDescription = '' , |
|||
$sParams = '' , |
|||
$blExclude = false , |
|||
$sAltObjectId = null |
|||
) |
Adds new seo entry to db
string | $sObjectId | objects id |
int | $iShopId | shop id |
int | $iLang | objects language |
string | $sStdUrl | default url |
string | $sSeoUrl | seo url |
string | $sType | object type |
bool | $blFixed | marker to keep seo config unchangeable |
string | $sKeywords | seo keywords |
string | $sDescription | seo description |
string | $sParams | additional seo params. optional (mostly used for db indexing) |
bool | $blExclude | exclude language prefix while building seo url |
string | $sAltObjectId | alternative object id used while saving meta info (used to override object id when saving tags related info) |
|
protected |
Assemble full paginated url.
\OxidEsales\Eshop\Application\Model\ | $object | Object, atm category, vendor, manufacturer, recommendationList. |
string | $type | Seo identifier, see oxseo.oxtype. |
string | $stdUrl | Standard url |
string | $seoUrl | Seo url |
integer | $pageNumber | Number of the page which should be prepared. |
string | $parameters | Additional parameters, mostly used by mysql for indices. |
int | $languageId | Language id. |
bool | $isFixed | Fixed url marker (default is null). |
OxidEsales\EshopCommunity\Core\SeoEncoder::copyStaticUrls | ( | $iShopId | ) |
Method copies static urls from base shop to newly created
int | $iShopId | new created shop id |
OxidEsales\EshopCommunity\Core\SeoEncoder::deleteSeoEntry | ( | $objectId, | |
$shopId, | |||
$language, | |||
$type | |||
) |
Remove a SEO entry from the database.
string | $objectId | The id of the object to delete. |
int | $shopId | The shop id of the object to delete. |
int | $language | The language of the object to delete. |
string | $type | The type of the object to delete. |
OxidEsales\EshopCommunity\Core\SeoEncoder::encodeStaticUrls | ( | $aStaticUrl, | |
$iShopId, | |||
$iLang | |||
) |
Static url encoder
array | $aStaticUrl | static url info (contains standard URL and urls for each language) |
int | $iShopId | active shop id |
int | $iLang | active language |
Exception |
OxidEsales\EshopCommunity\Core\SeoEncoder::encodeString | ( | $sString, | |
$blReplaceChars = true , |
|||
$iLang = false |
|||
) |
Replaces special chars in text
string | $sString | string to encode |
bool | $blReplaceChars | is true, replaces user defined (\OxidEsales\Eshop\Core\Language::getSeoReplaceChars) characters into alternative |
int | $iLang | language, for which to encode the string |
|
protected |
Execute a query on the database.
string | $query | The command to execute on the database. |
|
protected |
Runs query. Returns false when the query fail, otherwise return true
string | $query | Query to execute. |
OxidEsales\EshopCommunity\Core\SeoEncoder::fetchSeoUrl | ( | $standardUrl, | |
$languageId = null |
|||
) |
Searches for seo url in seo table. If not found - FALSE is returned
string | $standardUrl | |
int | $languageId |
OxidEsales\EshopCommunity\Core\SeoEncoder::getDynamicObjectId | ( | $iShopId, | |
$sStdUrl | |||
) |
Generates dynamic url object id (calls \OxidEsales\Eshop\Core\SeoEncoder::_getStaticObjectId)
int | $iShopId | shop id |
string | $sStdUrl | standard (dynamic) url |
OxidEsales\EshopCommunity\Core\SeoEncoder::getDynamicUrl | ( | $sStdUrl, | |
$sSeoUrl, | |||
$iLang | |||
) |
getDynamicUrl acts similar to static urls, except, that dynamic url are not shown in admin and they can be re-encoded by providing new seo url
string | $sStdUrl | standard url |
string | $sSeoUrl | part of URL query which will be attached to standard shop url |
int | $iLang | active language |
@access public
OxidEsales\EshopCommunity\Core\SeoEncoder::getMetaData | ( | $sObjectId, | |
$sMetaType, | |||
$iShopId = null , |
|||
$iLang = null |
|||
) |
Returns meta information for preferred object
string | $sObjectId | information object id |
string | $sMetaType | metadata type - "oxkeywords", "oxdescription" |
int | $iShopId | active shop id [optional] |
int | $iLang | active language [optional] |
OxidEsales\EshopCommunity\Core\SeoEncoder::getStaticUrl | ( | $sStdUrl, | |
$iLang = null , |
|||
$iShopId = null |
|||
) |
Returns static url for passed standard link (if available)
string | $sStdUrl | standard Url |
int | $iLang | active language (optional). default null |
int | $iShopId | active shop id (optional). default null |
OxidEsales\EshopCommunity\Core\SeoEncoder::markAsExpired | ( | $sId, | |
$iShopId = null , |
|||
$iExpStat = 1 , |
|||
$iLang = null , |
|||
$sParams = null |
|||
) |
Marks object seo records as expired
string | $sId | changed object id. If null is passed, object dependency is not checked |
int | $iShopId | active shop id. Shop id must be passed uf you want to do shop level update (default null) |
int | $iExpStat | expiration status: 1 - standard expiration |
int | $iLang | active language (optiona;) |
string | $sParams | additional params |
|
protected |
Searches for special characters in a string and replaces them with the configured strings.
string | $stringWithSpecialChars |
OxidEsales\EshopCommunity\Core\SeoEncoder::setIdLength | ( | $iIdlength = null | ) |
sets seo id length
string | $iIdlength | id length |
OxidEsales\EshopCommunity\Core\SeoEncoder::setPrefix | ( | $sPrefix | ) |
Sets SEO prefix
string | $sPrefix | SEO prefix |
OxidEsales\EshopCommunity\Core\SeoEncoder::setReservedWords | ( | $aReservedWords | ) |
Sets array of words which must be checked before building seo url These words are appended by seo prefix if they are the initial uri segment
array | $aReservedWords | reserved words |
OxidEsales\EshopCommunity\Core\SeoEncoder::setSeparator | ( | $sSeparator = null | ) |
Sets SEO separator
string | $sSeparator | SEO seperator |
|
staticprotected |
|
staticprotected |
Url fixed state cache
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |