Package DE_EPAGES::Object::API::Object::Site
object interface for Site.
Base |
DE_EPAGES::Object::API::Object::Object |
Functions
- addLocale
- backofficeLocales
- className
- clearPageCache
- currentDate
- dbPackage
- deleteFiles
- existsLocale
- existsSiteLocale
- filePath
- insertIntoPoolDB
- invalidatePageCache
- isTemporaryClosed
- removeLocale
- siteLocale
- units
addLocale
Adds a storefront locale to the site. Use $Site->get('SiteLocales') to get a list of all storefront locales.
Syntax |
$SiteLocale = $Site->addLocale($LocaleID); |
Example |
$SiteLocale = $Site->addLocale('de_DE'); |
Input |
|
Return |
|
backofficeLocales
Returns all locales that can be used in the back-office of the site.
Syntax |
$aLocales = $Site->backofficeLocales; |
Return |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $Site->className; |
Return |
|
clearPageCache
Clears the page cache of the complete site.
Syntax |
$Shop->clearPageCache(); |
currentDate
Returns the current date in the time zone of the site with time set to midnight (0:00:00).
Syntax |
$Date = DE_EPAGES::Object::API::Object::Site->currentDate(); |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $Site->dbPackage; |
Return |
|
deleteFiles
Deletes the directories PublicPath, PrivatePath.
Syntax |
$Object->deleteFiles; |
existsLocale
Returns true if the locale is $LocaleID is a storefront locale of the site.
Syntax |
$exists = $Site->existsLocale($LocaleID); |
Example |
$exists = $Site->existsLocale('de_DE'); |
Input |
|
Return |
|
existsSiteLocale
Returns true if the site supports the given locale.
Syntax |
$Exists = $Site->existsSiteLocale($LocaleID); |
Example |
if( $Site->existsSiteLocale('en_GB') ) { ... } |
Input |
|
Return |
|
filePath
Call DE_EPAGES::Core::API::File::ConvertPathChars with site 'Alias' and parent of site.
Syntax |
$Path = $Site->filePath; |
Return |
|
insertIntoPoolDB
Insert this object in to the pooldb.
Syntax |
$Site->insertIntoPoolDB(); |
invalidatePageCache
invalidates the page cache, use clearPageCache to clear it.
Syntax |
$Shop->invalidatePageCache(); |
isTemporaryClosed
This method should be overwritten. Otherwise it returns always 0. That means the site is open. Returns true if the site is closed temporary. In this case all pages should be delivered with the HTTP status 503 (Service Temporarily Unavailable) to prevent search engines from caching the "shop closed" message.
Syntax |
$IsClosed = $Site->isTemporaryClosed; |
Return |
|
removeLocale
Removes a storefront locale from the site.
Syntax |
$Site->removeLocale($LocaleID); |
Example |
$Site->removeLocale('de_DE'); |
Input |
|
siteLocale
Returns locale object with given locale identifier.
Syntax |
$Locale = $Site->siteLocale($LocaleID); |
Example |
$Site->siteLocale('en_GB')->roundMoney($amount, $CurrencyID); |
Input |
|
Return |
|
units
Returns a list of all units of measurements that are available in the site.
Syntax |
$aUnits = $Site->units; |
Return |
|