PHP Class Horde_View_Helper_Capture, horde

Author: Mike Naberezny ([email protected])
Author: Derek DeVries ([email protected])
Author: Chuck Hagenbuch ([email protected])
Inheritance: extends Horde_View_Helper_Base
Datei anzeigen Open project: horde/horde

Public Methods

Method Description
capture ( ) : Horde_View_Helper_Capture_Base Capture allows you to extract a part of the template into an instance variable.
contentFor ( string $name ) : Horde_View_Helper_Capture_ContentFor Calling contentFor() stores the block of markup for later use.

Method Details

capture() public method

You can use this instance variable anywhere in your templates and even in your layout. Example: capture() ?> Welcome To my shiny new web page! greeting = $capture->end() ?>
public capture ( ) : Horde_View_Helper_Capture_Base
return Horde_View_Helper_Capture_Base

contentFor() public method

Subsequently, you can retrieve it inside an instance variable that will be named "contentForName" in another template or in the layout. Example: contentFor("header") ?> end() ?> Use $this->contentForHeader anywhere in your templates: contentForHeader ?>
public contentFor ( string $name ) : Horde_View_Helper_Capture_ContentFor
$name string Name of the content that becomes the instance variable name. "foo" -> "$this->contentForFoo"
return Horde_View_Helper_Capture_ContentFor