ePages 6.10 - DE_EPAGES/Design/API/Object/Style.pm

Package DE_EPAGES::Design::API::Object::Style

object interface for Style.

Base
DE_EPAGES::Object::API::Object::Object

Functions

clone
deleteFiles
filePath
importXML
invalidatePageCache
isDefault
navbarElements
removeObsoleteStyleSheets
updatePageCache
writeCSS
writeCSSNoInc

clone

Clones style and Navbar elements.

Syntax
$Path = $Style->clone;
Return
$Path (string)
relative file path

deleteFiles

Deletes the directories PublicPath and calls super.

Syntax
$Object->deleteFiles;

filePath

Call DE_EPAGES::Core::API::File::ConvertPathChars with site 'Alias' and parent of site.

Syntax
$Path = $Style->filePath;
Return
$Path (string)
relative file path

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 = DE_EPAGES::Object::API::Object::Object->importXML($Handler, $hElement, $Class, $hAttributes);
Input
$Handler (object)
xml import handler with support function addObject
$hElement (ref.hash)
XML element structure, see XML::SAX
$Class (object)
class object; the new object will be an instance of this class
$hAttributes (ref.hash)
attributes hash
Return
$Object (object)
the imported object

invalidatePageCache

Invalidates page cache (mark at site).

Syntax
$Object->invalidatePageCache;

isDefault

Returns true if this style is the default style of the shop.

Syntax
$IsDefault = $Style->isDefault;
Example
if( $Style->isDefault ) { ... }
Return
$IsDefault (boolean)
true if this style is the default style

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 );
Input
$NavBarName (string)
navigation bar alias
Return
$aNavBarElements (ref.array.object)
navigation bar elements

removeObsoleteStyleSheets

Removes obsolete .css files, generated by writeCSSNoInc.

Syntax
$Style->removeObsoleteStyleSheets;

updatePageCache

Updates page cache date of the object's site if the object is an instance of one of the pre-defined classes (this classes implement invalidatePageCache method). These classes influence the content which is shown on storefront pages.

Syntax
$Object->updatePageCache;

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;

writeCSSNoInc

Write Cascading Style Sheet for this style to $PublicPath/StorefrontStyle_<Counter>.css and $PublicPath/EditorStyle_<Counter>.css, but doesnt increment the counter.

Syntax
$Style->writeCSSNoInc;