Package DE_EPAGES::Presentation::API::Object::TextProcessor
Handles simple templates with subset of TLE functionality.
Use method "registerHandler" to add more TLE handler. List of already registered
TLE handler can be found new and DE_EPAGES::TLE::API::BaseProcessor::new
See DE_EPAGES::TLE::API::Processor::registerHandler
Base |
DE_EPAGES::TLE::API::BaseProcessor |
Example |
... # Example - hook subrutine which init some text based on ShopWizard input my ($Servlet, $Shop) = @_; my $TemplateWithTLEs = 'Preview : #Shop.Address.Company - #Shop.Slogan'; # PageType only purpose is satisfy the dependencies of code included in $TemplateWithTLEs my LoadPageTypeByAlias('SF-Shop'); my $ObjPageType = DE_EPAGES::Presentation::API::Object::ObjectPageType->load( $PageType, $Shop ); my $Processor = DE_EPAGES::Presentation::API::Object::TextProcessor->new(); my $FinishedTemplate = $Processor->processText($ObjPageType, $Shop, $TemplateWithTLEs, $Shop->tleHash, $Servlet->languageID ); ... |
Functions
new
This method is used to create a new tle processor, this processor includes tle formatter and tle functions of these packages:
- DE_EPAGES::TLE::API::BaseProcessor::new - list of inherited packages
- DE_EPAGES::Presentation::API::TLE::IncludeTemplateHandler
- <pakcage DE_EPAGES::Presentation::API::Template>
Syntax |
$TLEProcessor = DE_EPAGES::Presentation::API::Object::TextProcessor->new; |
Return |
|
processText
Compile template and replace TLEs with localized values.
Syntax |
$PlainTemplate = $Processor->processText( $ObjectPageType, $Object, $Template, $hTLEHash, $LanguageID ) |
Input |
|
Return |
|