API Documentation

Zend/Form/Decorator/ViewScript.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Form  
Subpackage
Decorator  

\Zend_Form_Decorator_ViewScript

Package: Zend\Form\Decorator

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 - viewModule: module that view script is in (optional)

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, viewScript, and viewModule are passed to the partial as local variables.

Parent(s)
\Zend_Form_Decorator_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: ViewScript.php 24594 2012-01-05 21:27:01Z matthew $  

Properties

Propertyprotectedstring  $_placement= ''APPEND''

Default placement: append

Default value'APPEND'Details
Type
string
Propertyprotectedstring  $_viewModule= ''

View script module

Details
Type
string
Propertyprotectedstring  $_viewScript= ''

View script to render

Details
Type
string

Methods

methodpublicgetViewModule( ) : string|null

Get view script module

Returns
Type Description
string|null
methodpublicgetViewScript( ) : string|null

Get view script

Returns
Type Description
string|null
methodpublicrender( string $content ) : string

Render a view script

Parameters
Name Type Description
$content string
Returns
Type Description
string
methodpublicsetViewModule(  $viewModule ) : \Zend_Form_Decorator_ViewScript

Set view script module

Parameters
Name Type Description
$viewModule
Returns
Type Description
\Zend_Form_Decorator_ViewScript
methodpublicsetViewScript( string $script ) : \Zend_Form_Decorator_ViewScript

Set view script

Parameters
Name Type Description
$script string
Returns
Type Description
\Zend_Form_Decorator_ViewScript
Documentation was generated by DocBlox 0.15.1.