Package DE_EPAGES::Design::API::Object::Style
object interface for Style.
Base |
DE_EPAGES::Shop::API::Object::ShopObject |
Functions
- buildCSSWebPath
- canInvalidatePageCache
- className
- clone
- dbPackage
- deleteFiles
- duplicate
- filePath
- importXML
- isDefault
- navbarElements
- removeCSSFiles
- removeObsoleteStyleSheets
- writeCSS
- writeCSSFile
- writeCSSNoInc
buildCSSWebPath
Builds the URL where the given style sheet alias is located. The style will be generated if the IsInvalid flag is set.
Syntax |
$Style->buildCSSWebPath($StyleSheetAlias); |
Example |
$Style->buildCSSWebPath('StorefrontStyle'); |
Input |
|
Return |
|
canInvalidatePageCache
Overwrites method DE_EPAGES::Object::API::Object::Object->canInvalidatePageCache to invalidate page cache.
Syntax |
$Object->canInvalidatePageCache; |
Return |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $Style->className; |
Return |
|
clone
Clones style and Navbar elements.
Syntax |
$Clone = $Style->clone($hInfo, $Recursive); |
Input |
|
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $Style->dbPackage; |
Return |
|
deleteFiles
Deletes the directories PublicPath and calls super.
Syntax |
$Object->deleteFiles; |
duplicate
duplicates style
Syntax |
$Dublicate = $Style->duplicate; |
Return |
|
filePath
Call DE_EPAGES::Core::API::File::ConvertPathChars with site 'Alias' and parent of site.
Syntax |
$Path = $Style->filePath; |
Return |
|
importXML
Imports an object from an XML file. This function is called at the XML start tag. The end tag triggers the importXMLEnd function.
Syntax |
$Object = $Package->importXML($Handler, $hElement, $Class, $hAttributes); |
Input |
|
Return |
|
isDefault
Returns true if this style is the default style of the shop.
Syntax |
$IsDefault = $Style->isDefault; |
Example |
if( $Style->isDefault ) { ... } |
Return |
|
navbarElements
Returns the navigation bar elements that are assigned to the navigation bar with the given name in this style. The elements are ordered by Position.
Syntax |
$aNavBarElements = $Style->navbarElements( $NavBarName, {'Alignment' => 'Left'} ); |
Input |
|
Return |
|
removeCSSFiles
Actually deletes all obsoletes CSS files in the style's public path whose file name begins with the given prefixes.
Syntax |
$Style->removeCSSFiles(\@FileNamePrefixes); |
Example |
$Style->removeCSSFiles(['StorefrontStyle']); $Style->removeCSSFiles(['StorefrontStyle', 'EditorStyle']); |
Input |
|
removeObsoleteStyleSheets
Removes obsolete .css files, generated by writeCSSNoInc. Other cartridges can add their own obsolete files by the implementing the hook "API_RemoveObsoleteCSS".
Syntax |
$Style->removeObsoleteStyleSheets; |
writeCSS
Write Cascading Style Sheet for this style to $PublicPath/StorefrontStyle_<Counter>.css and $PublicPath/EditorStyle_<Counter>.css, increments the counter before.
Syntax |
$Style->writeCSS; |
writeCSSFile
Writes the actual css file for the given pagetype with the given vars at $PublicPath/_<Counter>.css
Syntax |
$Style->writeCSSFile($Alias, $PageTypeAlias, $hVars); |
Example |
$Style->writeCSSFile('StorefrontStyle', 'SF-Style', $hVars); |
Input |
|
writeCSSNoInc
Write Cascading Style Sheet for this style to $PublicPath/StorefrontStyle_<Counter>.css and $PublicPath/EditorStyle_<Counter>.css, but doesnt increment the counter. Other cartridges can add their own css files by the implementing the hook "API_WriteCSS".
Syntax |
$Style->writeCSSNoInc; |