fabarea / messenger

Send messages to a bunch of users - TYPO3 CMS extension
Other
5 stars 8 forks source link

Is visible to return false for empty Countable #14

Closed fsuter closed 8 years ago

fsuter commented 8 years ago

The isVisible view helper makes an early return with false when the value is null or when it is an empty string. It should also return false when the value is any form of Countable and the count is zero.

This happens typically if you have model properties which are collections of other objects. In this case, the value will be of type \TYPO3\CMS\Extbase\Persistence\ObjectStorage and will not evaluate to null, although it should not be displayed if its count is zero.