-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add auto escape method to Zend\View\Helper\FlashMessenger #5743
Conversation
I think this should also be defined out on the render portion of the object so that you can set it easily within one line or rather than using an initializer. |
What exactly do you mean? As a third parameter for the method echo $this->flashMessenger()->setAutoEscape(false)->render(); |
@Martin-P yes; understand that. but many people like to utilize it as follows: echo $this->flashMessenger()->render('MyNamespace', array('alert alert-success')); I am ultimately saying that one might want to leverage a boolean flag as the third option. |
Agreed with @mwillbanks -- escaping is a rendering issue, and it should be possible to pass the flag to
Make sense, @Martin-P ? |
Thanks for the clarification, I updated the code accordingly. |
…module-manager-init' Close zendframework#5948
This PR needs a rebase |
Add auto escape method to Zend\View\Helper\FlashMessenger
- Return from conditional, to remove an else clause
- use `null ===` instead of `is_null` (consistency)
- Return from conditional, to remove an else clause
- use `null ===` instead of `is_null` (consistency)
- Return from conditional, to remove an else clause
- use `null ===` instead of `is_null` (consistency)
- Return from conditional, to remove an else clause
I'm trying to put a link into a flashmessage... this working? Cause in my project, this function don't have this parameter $autoEscape. I'm sorry, just now I saw that it will be available in ZF 2.4.0. |
…ue-5600 Add auto escape method to Zend\View\Helper\FlashMessenger
- use `null ===` instead of `is_null` (consistency)
- Return from conditional, to remove an else clause
Added methods
setAutoEscape
andgetAutoEscape
toZend\View\Helper\FlashMessenger
as proposed in issue #5600.