Skip to end of metadata
Go to start of metadata

Zend Framework: Zend_View_Helper_Cycle Component Proposal

Proposed Component Name Zend_View_Helper_Cycle
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_View_Helper_Cycle
Proposers Kamil Nowakowski
Matthew Weier O'Phinney (Zend Liaison)
Revision 0.1 - 5 April 2008: Initial proposal (wiki revision: 21)

Table of Contents

1. Overview

Zend_View_Helper_Cycle is a simple component which cycles through a series of values based on an iteration number.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This helper will cycle through a series of values based on an iteration number.
  • This helper will implement Iterator interface

4. Dependencies on Other Framework Components

  • none

5. Theory of Operation

  • You can cycle in both ways (normal or backwards) through the array

6. Milestones / Tasks

  • Milestone 1:[DONE] Create proposal
  • Milestone 2: Community [DONE] and Zend review
  • Milestone 3: Unit tests exist, work, and are checked into SVN.
  • Milestone 4: Initial documentation exists.

7. Class Index

  • Zend_View_Helper_Cycle

8. Use Cases

UC-01

output

UC-02

In backwards order

9. Class Skeletons

Labels:
cycle cycle Delete
proposal proposal Delete
view view Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Apr 05, 2008

    Gets my vote - I already use my own but would appreciate an 'official' version

  2. Apr 06, 2008

    I do not believe that it is necessary to be extending Zend_View_Helper_Placeholder_Container_Standalone

  3. Apr 26, 2008

    I propose to do a simpler implementation. Instead of passing always the array to the constructor, pass the values with a special method ('assign') and retrieve the next one using another method called 'next', 'get' or whatever you want.

    The example would be like this:

  4. Jul 03, 2008

    I agree with Xaview I think that the posibility to earn next,previous,current, first and last value can by quite handy.

    1. Jul 04, 2008

      thanks for suggestions , i will look at this after weekend

  5. Aug 05, 2008

    Zend Comment
    This component is approved for development in standard/incubator, with the
    following notes/caveats:
    • Please do not extend the base placeholder helper. We feel this would limit use cases, such as when a developer wishes to have multiple cycle objects in play at once.
    • Please add an accessor for adding cycle arguments, and make passing them to the helper optional. This will promote re-use of cycle objects within view scripts.
  6. Mar 18, 2009

    Has this proposal been abandoned? Please reply here.

  7. Mar 19, 2009

    Code (class, tests and docs) is in incubator, but i have to do some changes, improvments ,I will finish it in few days

  8. Mar 20, 2009

    Wil, I have finished the code , the helper is ready to use, (tests and docs are also in incubator)

  9. Mar 20, 2009

    Great! Can you please work with MAtthew to make sure it gets promoted to trunk ASAP. I want to make sure this gets in 1.8.

    ,Wil