Class Zend_Form_Decorator_ViewScript

Description

Zend_Form_Decorator_ViewScript

Render a view script as a decorator

Accepts the options:

  • separator: separator to use between view script content and provided content (defaults to PHP_EOL)
  • placement: whether to append or prepend view script content to provided content (defaults to prepend)
  • viewScript: view script to use
The view script is rendered as a partial; the element being decorated is passed in as the 'element' variable:
  1.  // in view script:
  2.  echo $this->element->getLabel();

Any options other than separator, placement, and viewScript are passed to the partial as local variables.

  • version: $Id: ViewScript.php 20096 2010-01-06 02:05:09Z bkarwin $
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Form/Decorator/ViewScript.php (line 52)

Zend_Form_Decorator_Abstract
   |
   --Zend_Form_Decorator_ViewScript
Variable Summary
 string $_placement
 string $_viewScript
Method Summary
 string|null getViewScript ()
 string render (string $content)
Variables
string $_placement = 'APPEND' (line 58)

Default placement: append

  • access: protected

Redefinition of:
Zend_Form_Decorator_Abstract::$_placement
Default placement: append
string $_viewScript (line 64)

View script to render

  • access: protected

Inherited Variables

Inherited from Zend_Form_Decorator_Abstract

Zend_Form_Decorator_Abstract::$_element
Zend_Form_Decorator_Abstract::$_options
Zend_Form_Decorator_Abstract::$_separator
Methods
Class Constants

Documentation generated on Mon, 21 Jun 2010 15:52:13 -0400 by phpDocumentor 1.4.3