eZPublish  4.4
eZTemplateDesignResource Class Reference
+ Inheritance diagram for eZTemplateDesignResource:
+ Collaboration diagram for eZTemplateDesignResource:

Public Member Functions

 clearKeys ()
 
 createOverrideCache ()
 
 eZTemplateDesignResource ($name="design")
 
 handleResource ($tpl, &$resourceData, $method, &$extraParameters)
 
 keys ()
 
 removeKey ($key)
 
 setDesignSetting ($designSetting, $type= 'standard')
 
 setKeys ($keys)
 
 setOverrideAccess ($siteAccess)
 
 templateNodeTransformation ($functionName, &$node, $tpl, &$resourceData, $parameters, $namespaceValue)
 
- Public Member Functions inherited from eZTemplateFileResource
 cachedTemplateTree ($keyData, $uri, $res, $templatePath, &$extraParameters, $timestamp)
 
 cacheKey ($keyData, $res, $templatePath, &$extraParameters)
 
 canCompileTemplate ($tpl, &$resourceData, &$extraParameters)
 
 compileTemplate ($tpl, $keyData, $uri, $res, $templatePath, &$extraParameters, &$resourceData)
 
 executeCompiledTemplate ($tpl, &$textElements, $keyData, $uri, $resourceData, $templatePath, &$extraParameters, $timestamp, $rootNamespace, $currentNamespace)
 
 eZTemplateFileResource ($name="file", $servesStaticData=true)
 
 handleResource ($tpl, &$resourceData, $method, &$extraParameters)
 
 hasCachedProcessTree ($keyData, $uri, $res, $templatePath, &$extraParameters, $timestamp)
 
 hasCompiledTemplate ($keyData, $uri, &$resourceData, $templatePath, &$extraParameters, $timestamp)
 
 resourceName ()
 
 servesStaticData ()
 
 setCachedTemplateTree ($keyData, $uri, $res, $templatePath, &$extraParameters, &$root)
 
 templateNodeTransformation ($functionName, &$node, $tpl, &$resourceData, $parameters, $namespaceValue)
 

Static Public Member Functions

static addGlobalOverride ($name, $source, $match, $subdir, $matches)
 
static allDesignBases ($siteAccess=false)
 
static clearInMemoryCache ()
 Clear in memory cache (design settings and override cache) More...
 
static clearInMemoryOverrideArray ()
 Clear in memory override array cache. More...
 
static designExtensions ()
 
static designSetting ($type= 'standard')
 
static designStartPath ()
 
static fileMatch ($bases, $element, $path, &$triedFiles)
 
static instance ()
 Returns a shared instance of the eZTemplateDesignResource class. More...
 
static overrideArray ($siteAccess=false)
 Get an array of all the current templates and overrides for them. More...
 
 overrideKeys ($siteAccess=false)
 
static serializeOverrides ($siteAccess=false, $matchKeys=array())
 
static setDesignStartPath ($path)
 
- Static Public Member Functions inherited from eZTemplateFileResource
 handleResourceData ($tpl, $handler, &$resourceData, $method, &$extraParameters)
 

Public Attributes

 $Keys
 
 $OverrideSiteAccess = false
 
const DESIGN_BASE_CACHE_NAME = 'designbase_'
 
- Public Attributes inherited from eZTemplateFileResource
 $Name
 The name of the resource. More...
 
 $ServesStaticData
 True if the data served from this resource is static, ie it can be cached properly. More...
 
 $TemplateCache
 The cache for templates. More...
 

Static Protected Attributes

static $overrideArrayCache = null
 

Private Member Functions

 mergeKeys (&$originalKeys, $keys)
 

Static Private Member Functions

static findDesignBase (eZINI $ini, $siteAccess=false)
 Find the location on design bases on the disk. More...
 
static savesMemoryCache (array $designBaseList, $siteAccess=false)
 Stores design base list in memory for the current request. More...
 

Member Function Documentation

static eZTemplateDesignResource::addGlobalOverride (   $name,
  $source,
  $match,
  $subdir,
  $matches 
)
static
static eZTemplateDesignResource::allDesignBases (   $siteAccess = false)
static
Returns
Gives all knows bases for avialable sitedesign folders.

Referenced by eZURLOperator\eZDesign(), and eZURLOperator\eZImage().

static eZTemplateDesignResource::clearInMemoryCache ( )
static

Clear in memory cache (design settings and override cache)

Since
4.4

Referenced by eZSiteAccess\load().

static eZTemplateDesignResource::clearInMemoryOverrideArray ( )
static

Clear in memory override array cache.

Since
4.2

Referenced by eZCache\clearTemplateOverrideCache().

eZTemplateDesignResource::clearKeys ( )

Removes all override keys.

See Also
setKeys
eZTemplateDesignResource::createOverrideCache ( )

Generates the cache for the template override matching.

Referenced by handleResource().

static eZTemplateDesignResource::designExtensions ( )
static
Returns
An array containing the names of the design extensions that are currently active
static eZTemplateDesignResource::designSetting (   $type = 'standard')
static
Returns
the sitedesign for the design type $type, currently standard and site is allowed. If no sitedesign is set it will fetch it from site.ini.

Referenced by createOverrideCache(), eZURLOperator\eZDesign(), eZURLOperator\eZImage(), and eZTemplatesStatisticsReporter\generateStatistics().

static eZTemplateDesignResource::designStartPath ( )
static
Returns
The start path of the design directory, by default it will return 'design' To change the directory use setDesignStartPath().

Referenced by eZContentObjectPackageHandler\installTemplates().

eZTemplateDesignResource::eZTemplateDesignResource (   $name = "design")

Initializes with a default resource name "design".

Referenced by instance().

static eZTemplateDesignResource::fileMatch (   $bases,
  $element,
  $path,
$triedFiles 
)
static
static eZTemplateDesignResource::findDesignBase ( eZINI  $ini,
  $siteAccess = false 
)
staticprivate

Find the location on design bases on the disk.

Parameters
$inian eZINI object
$siteAccessWether to use siteaccesses or not
Returns
array The list of design bases
eZTemplateDesignResource::handleResource (   $tpl,
$resourceData,
  $method,
$extraParameters 
)

Loads the template file if it exists, also sets the modification timestamp. Returns true if the file exists.

eZTemplateDesignResource::keys ( )
Returns
the match keys.
See Also
setKeys
eZTemplateDesignResource::mergeKeys ( $originalKeys,
  $keys 
)
private

Merges keys set in $keys with the array in $originalKeys.

Referenced by handleResource(), and setKeys().

static eZTemplateDesignResource::overrideArray (   $siteAccess = false)
static
eZTemplateDesignResource::overrideKeys (   $siteAccess = false)
static
Returns
an array with keys that define the current override.

Referenced by createOverrideCache().

eZTemplateDesignResource::removeKey (   $key)

Removes the given key

static eZTemplateDesignResource::savesMemoryCache ( array  $designBaseList,
  $siteAccess = false 
)
staticprivate

Stores design base list in memory for the current request.

Parameters
$designBaseListAn array with the design bases
$siteAccessWhether to use siteaccess or not
Returns
void
static eZTemplateDesignResource::serializeOverrides (   $siteAccess = false,
  $matchKeys = array() 
)
static
eZTemplateDesignResource::setDesignSetting (   $designSetting,
  $type = 'standard' 
)

Sets the sitedesign for the design type $type, currently standard and site is allowed. The design is set to $designSetting.

static eZTemplateDesignResource::setDesignStartPath (   $path)
static

Changes the design start path which is used to find design files.

Parameters
$pathMust be a string defining the path or false to use default start path.
See Also
designStartPath();
eZTemplateDesignResource::setKeys (   $keys)

Sets the override keys to $keys, if some of the keys already exists they are overriden by the new keys.

See Also
clearKeys
eZTemplateDesignResource::setOverrideAccess (   $siteAccess)

Sets the siteaccess which are to be used for loading the override settings.

eZTemplateDesignResource::templateNodeTransformation (   $functionName,
$node,
  $tpl,
$resourceData,
  $parameters,
  $namespaceValue 
)

Member Data Documentation

eZTemplateDesignResource::$Keys

Referenced by handleResource(), and keys().

eZTemplateDesignResource::$overrideArrayCache = null
staticprotected
eZTemplateDesignResource::$OverrideSiteAccess = false
const eZTemplateDesignResource::DESIGN_BASE_CACHE_NAME = 'designbase_'

The documentation for this class was generated from the following file: