Review main Abandoned

24633[FEATURE] Create an UnlessViewHelper as opposite to the IfViewHelper

Wouter Wolters CR 0 V 0 Normal +137 −0 updated 07/29/14, 23:16

Commit message

This changeSet adds a new UnlessViewHelper which acts excactly
like the IfViewHelper apart from the Negation of the condition.

Main reason for this new ViewHelper is to have a quicker way to
handle an if->else usecase like::

	<f:for each="{emptyQuery}" as="object">.</f:for>
	<f:unless condition="{emptyQuery}">No Objects found</f:unless>

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 2

Review log 11

  1. Anja Leichsenring voted on patch set 1 V +1 CR +1 10/12/13, 15:28

  2. Helmut Hummel commented on patch set 1 10/12/13, 16:15

    What about adding the compiling stuff from the if view helper? or extend abstract condition viewhelper and reuse the compiling from there?
  3. Helmut Hummel commented on patch set 1 10/12/13, 16:18

    Disclaimer: I have no idea how that could work, if it works at all
  4. Helmut Hummel commented on patch set 1 10/12/13, 16:22

    UnlessViewHelper.php:57

    How would the inline notation look like?
  5. Mr. Jenkins commented on patch set 1 10/12/13, 17:51

  6. Anja Leichsenring commented on patch set 1 CR -1 10/12/13, 18:15

    I will rethink this. To have a shorthand syntax will be very handy!
  7. Wouter Wolters wrote 10/16/13, 18:11

    Topic set to "fluid".
  8. Anja Leichsenring commented on patch set 1 10/27/13, 11:09

    I am all in for using the if-VH, reversing the condition and be done. This are five lines of code we reuse, I think this is bearable in comparison to the gains: - shorthand syntax - then and else possible consider this use case: <f:for each="{entries} as="entry" iteration="foo"> <li class="{f:unless (condition:foo.isLast, then: 'list_entry', else:'list_entry_last)}"></li> </f:for>
  9. Helmut Hummel commented on patch set 1 10/27/13, 16:40

    +1 for this approach
  10. Aske Ertmann commented on patch set 1 02/15/14, 12:16

    Hi. Just FYI this discussion is going on in I933f48ae63f81e0119d74afb875463a24067cbd7 as well. If you have any insights please share them :)
  11. Wouter Wolters abandoned the change 07/29/14, 23:16