Class WFSkinDelegate

Description

Delegate interface for the skin object.

The skin delegate provides the skin system with a way of extending the skin's capabilities. Essentially, the WFSkin object is a framework for building "themed" pages. The parts of each skin that are provided by the skin infrastructure can be easily customized using the skin delegate system.

The main web application mechanism always uses the skin delegate provided by WFApplicationDelegate. However, an application may have multiple skin delegates for multiple skinned usages. For instance, maybe you have a need to send skinned email, but the skins for email have a different setup than the normal web site. In this case, you could create a skin object and provide a specialized skin delegate to handle the skinnable email function.

You may also find that you need more template types besides "normal" and "raw". WFSkinDelegate allows you to manifest additional templateTypes(). Each skin you create for that WFSkinDelegate will of course need to implement all of the templateTypes() that the skinDelegate supports.

Located in /framework/WFSkin.php (line 72)


	
			
Method Summary
void loadDefaults (object WFSkin $skin)
mixed namedContent (string $name, [assoc_array $params = NULL])
array namedContentList ()
array templateTypes ()
void willRender (object WFSkin $skin)
Methods
loadDefaults (line 107)

A delegate method to allow the delegate object to load default values for certain skin properties such as: skin, skinTheme, metaDescription, metaKeywords, title etc.

Example:

$skin->setSkin('exampleskin2'); $skin->setTheme('red'); $skin->setMetaDescription('This is the default description.'); $skin->addMetaKeywords(array('more', 'keywords')); $skin->setTitle('Page Title');

void loadDefaults (object WFSkin $skin)
namedContent (line 85)

Retreive the "named" content from the skin delegate.

The "named content" mechanism is the way by which individual applications using this framework can add additional content sections for use in their skins. By default, only a HEAD and BODY section exist within the skin. Individual applications can use the named content mechanism to supply skin-specific information such as NAVIGATION LINKS, COPYRIGHT DISCLAIMERS, etc.

  • return: The named content as provided byt he skin delegate.
mixed namedContent (string $name, [assoc_array $params = NULL])
  • string $name: Name of the content to retrieve.
  • assoc_array $params: Optional parameter list. Name/value pairs to pass on to content generator.
namedContentList (line 92)

Get a list of all named content for the skin delegate.

  • return: A list of all named content items in the catalog for this skin delegate.
array namedContentList ()
templateTypes (line 115)

Get a list of the additional template types (besides "normal" and "raw") that are supported by this skin.

  • return: An array of strings; each is a template type that is supported by this skin. For each skin, there must be a template_<templateType>.tpl file for each manifested template type.
array templateTypes ()
willRender (line 124)

Callback method which is called just before the skin is rendered.

This allows your skin delegate to calculate anything it might need to pass on to the skin for use in rendering.

void willRender (object WFSkin $skin)

Documentation generated on Thu, 14 May 2009 16:20:31 -0400 by phpDocumentor 1.4.2