API Documentation

Form/Decorator/ViewScript.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
Classes
Zend_Form_Decorator_ViewScript

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Form_Decorator_ViewScript

Extends from
Zend_Form_Decorator_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
version
$Id: ViewScript.php 20096 2010-01-06 02:05:09Z bkarwin $
Properties
$_placement
$_viewScript
Methods
setViewScript
getViewScript
render

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: // in view script: echo $this->element->getLabel();

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

Properties

$_placement

string $_placement = 'APPEND'

Default placement: append

Details

$_placement
string
visibility
protected
default
APPEND
final
false
static
false

$_viewScript

string $_viewScript = ''

View script to render

Details

$_viewScript
string
visibility
protected
default
final
false
static
false

Methods

getViewScript

getViewScript( ) : string|null

Get view script

Output
string|null
Details
visibility
public
final
false
static
false

render

render( string $content ) : string

Render a view script

Arguments
$content
string
Output
string
Details
visibility
public
final
false
static
false

setViewScript

setViewScript( string $script ) : Zend_Form_Decorator_ViewScript

Set view script

Arguments
$script
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.