Overview

Packages

  • View
    • Helper

Classes

  • Horde_View_Helper_Base
  • Horde_View_Helper_Benchmark
  • Horde_View_Helper_Benchmark_Timer
  • Horde_View_Helper_Block
  • Horde_View_Helper_Capture
  • Horde_View_Helper_Capture_Base
  • Horde_View_Helper_Capture_ContentFor
  • Horde_View_Helper_Date
  • Horde_View_Helper_Debug
  • Horde_View_Helper_Form
  • Horde_View_Helper_Form_Builder
  • Horde_View_Helper_Form_InstanceTag_Base
  • Horde_View_Helper_Form_InstanceTag_Form
  • Horde_View_Helper_FormTag
  • Horde_View_Helper_Javascript
  • Horde_View_Helper_Number
  • Horde_View_Helper_Tag
  • Horde_View_Helper_Text
  • Horde_View_Helper_Text_Cycle
  • Horde_View_Helper_Url
  • Overview
  • Package
  • Class
  • Tree

Class Horde_View_Helper_Capture

Capture lets you extract parts of code which can be used in other points of the template or even layout file.

Horde_View_Helper_Base
Extended by Horde_View_Helper_Capture
Package: View\Helper
Category: Horde
License: http://www.horde.org/licenses/bsd
Author: Mike Naberezny mike@maintainable.com
Author: Derek DeVries derek@maintainable.com
Author: Chuck Hagenbuch chuck@horde.org
Located at Horde/View/Helper/Capture.php
Methods summary
public Horde_View_Helper_Capture_Base
# capture( )

Capture allows you to extract a part of the template into an instance variable.

Capture allows you to extract a part of the template into an instance variable.

You can use this instance variable anywhere in your templates and even in your layout. Example:

<?php $capture = $this->capture() ?>
Welcome To my shiny new web page!
<?php $this->greeting = $capture->end() ?>

Returns

Horde_View_Helper_Capture_Base
public Horde_View_Helper_Capture_ContentFor
# contentFor( string $name )

Calling contentFor() stores the block of markup for later use.

Calling contentFor() stores the block of markup for later use.

Subsequently, you can retrieve it inside an instance variable that will be named "contentForName" in another template or in the layout. Example:

<?php $capture = $this->contentFor("header") ?>
<script type="text/javascript">alert('hello world')</script>
<?php $capture->end() ?>

// Use $this->contentForHeader anywhere in your templates:
<?php echo $this->contentForHeader ?>

Parameters

$name
<p>Name of the content that becomes the instance variable name. "foo" -> "$this->contentForFoo"</p>

Returns

Horde_View_Helper_Capture_ContentFor
Methods inherited from Horde_View_Helper_Base
__call(), __construct(), __get(), __set()
API documentation generated by ApiGen