-
Notifications
You must be signed in to change notification settings - Fork 155
[WIP] Feature: Flash Messenger Error Messages #421
Conversation
6b7a105
to
7b97bc8
Compare
{ | ||
$this->classOptions = [ | ||
PluginFlashMessenger::NAMESPACE_INFO => [ | ||
'name' => $this->getTranslator()->translate('Information'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of translate
calls that aren't actually needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, avoid calling getTranslator
everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ocramius should i avoid using translate in order that at some point the site gets multi language or calling the translator once into a var and translate it into the loop?
@Ocramius would be nice if you could review this like meat through a meat chipper 🍖 // or everyone else of course :) |
$messageClasses = [ | ||
$namespace => $this->classOptions[PluginFlashMessenger::NAMESPACE_DEFAULT], | ||
]; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid this else
: do this assign operation earlier
@ins0 done |
|
||
class FlashMessenger extends ZendFlashMessenger | ||
{ | ||
/** @var array */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string[][]
thanks @Ocramius for your first review, changed most of the suggestions - others waiting for reply 😸 |
e4c616a
to
61ebb03
Compare
@@ -211,7 +208,8 @@ public function removeAction() | |||
|
|||
$request = $this->getRequest(); | |||
if (!$request->isPost()) { | |||
throw new Exception\UnexpectedValueException('Something went wrong with the post values of the request...'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw InvalidRequestDataException::fromInvalidPostRequest($request)
85a59be
to
b7676ff
Compare
@Ocramius may take the final look over this, please? 😃 |
private $publicMessage; | ||
|
||
/** | ||
* @inheritdoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah will fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ping @Ocramius :) |
👍 |
[WIP] Feature: Flash Messenger Error Messages
thanks @Ocramius @localheinz 👍 |
This PR