Re: Smarty QuickForm2 Renderer

From: Date: Fri, 20 Nov 2009 17:17:57 +0000
Subject: Re: Smarty QuickForm2 Renderer
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30161@lists.php.net to get a copy of this message
On Thu, Nov 19, 2009 at 04:51:36PM +0300, Alexey Borzov wrote: > Hi Alain, > > Alain Williams wrote: > >Try again - this time with a proper Subject and with the > >renderer attached. A new version is attached. > >* Renderer.php > You could add this option in your Renderer's constructor, no need to patch > the base class. Hmmm: your class inheritance is complicated - I can't see how to do that. Could I ask you to do that and post a version back. > I had a brief look at your implementation: > 1) Why aren't you extending the Array renderer? 2/3 of your class is > copy-pasted from there. True - I did not realise how small the changes would be. The new version works by taking 2 options to the array renderer: * smarty -- this has most effect * old_compat -- needed for existing templates, prob not neede for new templates > 2) Why do you have some hardcoded HTML inside the renderer? There is now just a small amount in gneration of requirednote. To see how this plugs together see a tutorial set that I have at: http://www.phcomp.co.uk/TechTutorial/QfSmarty/index.php (This runs the QuickForm and NOT the QuickForm2 version, but the output is the same). All feedback gratefully accepted. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h>

Attachment: [application/x-gzip] smarty_renderer-1.tar.gz
« previous php.pear.general (#30161) next »