ePages 6.17.43 - DE_EPAGES/Presentation/API/Object/Template.pm

Package DE_EPAGES::Presentation::API::Object::Template

object interface for Template.

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

Functions

_getDirectTemplateMap
className
dbPackage
existsDirectTemplateMap
getDefaultTemplateMap
getDefaultTemplateType
getDirectTemplateMap
getTemplateMap
getTemplateType
getTemplateTypes
id
primaryKey
setTemplateMap

_getDirectTemplateMap

Returns the direct template map for the template and the given object. Returns undef if nothing was found.

Syntax
$TemplateMap = $Template->_getDirectTemplateMap($Object);
Input
$Object (DE_EPAGES::Object::API::Object::Object)
related object
Return
$TemplateMap (DE_EPAGES::Presentation::API::Object::TemplateMap)
template map object

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $Template->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $Template->dbPackage;
Return
$DbPackage (String)
database package name

existsDirectTemplateMap

Returns true if a direct template map exists else false.

Syntax
$Exists = $Template->existsDirectTemplateMap($Object);
Input
$Object (object)
Related Object
Return
$Exists (boolean)
Exists direct template map

getDefaultTemplateMap

Returns the default template map for this template.

Syntax
$TemplateMap = $Template->getDefaultTemplateMap;
Return
$TemplateMap (DE_EPAGES::Presentation::API::Object::TemplateMap)
template map object

getDefaultTemplateType

Returns the default template type for this template.

Syntax
$TemplateType = $Template->getDefaultTemplateType;
Return
$TemplateType (DE_EPAGES::Presentation::API::Object::TemplateType)
template type object

getDirectTemplateMap

Returns the direct template map for the template and the given object. Throws an error if nothing was found.

Syntax
$TemplateMap = $Template->getDirectTemplateMap($Object);
Input
$Object (DE_EPAGES::Object::API::Object::Object)
related object
Return
$TemplateMap (DE_EPAGES::Presentation::API::Object::TemplateMap)
template map object

getTemplateMap

Returns a the template map for a specific object, considers inheritance (e.g. on ProductType or Category trees). If the the presentation has to be customized for this object in particular a direct template map is required. In those cases the method getDirectTemplateMap shall be used!

Syntax
$TemplateMap = $Template->getTemplateMap($Object);
Input
$Object (DE_EPAGES::Object::API::Object::Object)
related object
Return
$TemplateMap (DE_EPAGES::Presentation::API::Object::TemplateMap)
template map object

getTemplateType

Returns a specific template type for this template.

Syntax
$TemplateType = $Template->getTemplateType($TemplateTypeAlias);
Input
$TemplateTypeAlias (string)
Name of the template type
Return
$TemplateType (DE_EPAGES::Presentation::API::Object::TemplateType)
template type object

getTemplateTypes

Returns all template types for this template.

Syntax
$aTemplateTypes = $Template->getTemplateTypes;
Return
$aTemplateTypes (ref.array.DE_EPAGES::Presentation::API::Object::TemplateType)
list of template type objects

id

Returns the Template id.

Syntax
$TemplateID = $Template->id;
Return
$TemplateID (int)
object id

primaryKey

Returns the name of the primary key.

Syntax
$PrimaryKey = $Template->primaryKey;
Return
$PrimaryKey (String)
primimary key

setTemplateMap

Selects the template type to be used with a given object. If there is already an existing template map it will be deleted before inserting the new one. Omit $TemplateType param if you just want to deleted the existing template map.

Syntax
$TemplateMap = $Template->setTemplateMap($Object, $TemplateType);
Input
$Object (object)
Related Object
$TemplateType (DE_EPAGES::Presentation::API::Object::TemplateType)
$TemplateType (optional)
Return
$TemplateMap (DE_EPAGES::Presentation::API::Object::TemplateMap)
template map object