News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matthew Weier O'Phinney's Blog:
Rendering Zend_Form decorators individually
April 10, 2009 @ 10:23:44

Matthew Weier O'Phinney has another post in his look at the decorator pattern in Zend Framework applications. This time he takes a step back and shows how to execute them individually.

In the previous installment of this series on Zend_Form decorators, I looked at how you can combine decorators to create complex output. In that write-up, I noted that while you have a ton of flexibility with this approach, it also adds some complexity and overhead. In this article, I will show you how to render decorators individually in order to create custom markup for your form and/or individual elements.

So, instead of registering them with the Zend_Form element, he shows how you can pull out the one decorator (with a getDecorator call) and render it separately. It can be simplified even more with the renderSimpleInput method called on the decorator object. He gives a use case example in defining a form that needs more exact control over the layout.

0 comments voice your opinion now!
zendform zendframework decorator pattern individually tutorial


blog comments powered by Disqus

Similar Posts

DevShed: Integrate Facebook Comments Code with Wordpress or PHP

PHP-GTK Community Site: GtkToolbar, GtkMenubar, and PEAR XML-RPC for geo-nick

Rob Morgan's Blog: Howto Log Directly to Your OS X Terminal using Zend Framework and NodeJS

NetTuts.com: Running WordPress on OpenShift: An Introduction

Zend Developer Zone: Zend_Gdata for Picasa, YouTube, Google Documents List


Community Events

Don't see your event here?
Let us know!


version extension conference interview community php7 example laravel podcast library introduction api release framework list symfony2 opinion series voicesoftheelephpant performance

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework