[cvs] commit: whups admin.php query.php scry export.php vote.php horde/lib Form.php whups/lib Query.php whups/templates queryrenderer.inc horde/lib/Form Renderer.php horde/lib/Form/Renderer rows.php scry/lib Vote.php

Chuck Hagenbuch chuck at horde.org
Sat Nov 22 17:44:25 PST 2003


chuck       2003/11/22 17:44:25 PST

  Modified files:
    .                    admin.php query.php 
    .                    export.php vote.php 
    lib                  Form.php 
    lib                  Query.php 
    templates            queryrenderer.inc 
    lib/Form             Renderer.php 
    lib/Form/Renderer    rows.php 
    lib                  Vote.php 
  Log:
  Re-work how we handle custom form renderers, and hopefully make them a bit
  easier to use/more useful.
  
  Horde_Form_Renderer::_renderForm() no longer bails out with a custom renderer
  and calls a render() method, which doesn't actually exist in the base class.
  Instead, there is a Horde_Form::getRenderer() method (which replaces
  Horde_Form::getCustomRenderer()) that simply returns the correct renderer
  for the form. You then just use that instead of $renderer = &new Horde_Form_Renderer()
  - the base class will return a basic Horde_Form_Renderer for you.
  
  In the custom form renderer class itself, you just extend the Horde_Form_Renderer
  class and override any methods that you want to alter, instead of necessarily
  having to re-write the whole render() loop.
  
  I've updated every occurrance of any of this code that I can find to take
  advantage of this new architecture, and made a few minor tweaks while I
  was at it. Also, some phpdoc comments for the custom renderer stuff.
  
  Revision  Changes    Path
  1.190     +22 -4     horde/lib/Form.php
  1.137     +5 -32     horde/lib/Form/Renderer.php
  1.16      +4 -5      horde/lib/Form/Renderer/rows.php
  1.15      +4 -4      scry/export.php
  1.12      +18 -4     scry/lib/Vote.php
  1.21      +2 -3      scry/vote.php
  1.53      +4 -1      whups/admin.php
  1.22      +6 -4      whups/lib/Query.php
  1.32      +12 -15    whups/query.php
  1.23      +7 -3      whups/templates/queryrenderer.inc

  Chora Links:
  http://cvs.horde.org/diff.php/horde/lib/Form.php?r1=1.189&r2=1.190&ty=u
  http://cvs.horde.org/diff.php/horde/lib/Form/Renderer.php?r1=1.136&r2=1.137&ty=u
  http://cvs.horde.org/diff.php/horde/lib/Form/Renderer/rows.php?r1=1.15&r2=1.16&ty=u
  http://cvs.horde.org/diff.php/scry/export.php?r1=1.14&r2=1.15&ty=u
  http://cvs.horde.org/diff.php/scry/lib/Vote.php?r1=1.11&r2=1.12&ty=u
  http://cvs.horde.org/diff.php/scry/vote.php?r1=1.20&r2=1.21&ty=u
  http://cvs.horde.org/diff.php/whups/admin.php?r1=1.52&r2=1.53&ty=u
  http://cvs.horde.org/diff.php/whups/lib/Query.php?r1=1.21&r2=1.22&ty=u
  http://cvs.horde.org/diff.php/whups/query.php?r1=1.31&r2=1.32&ty=u
  http://cvs.horde.org/diff.php/whups/templates/queryrenderer.inc?r1=1.22&r2=1.23&ty=u


More information about the cvs mailing list