Skip to content
Browse files

Add adminaction Magento snippet

  • Loading branch information...
1 parent 510d2a1 commit 06dfe9f4fb8e86e23276c536c8d664542e7b8c8b @vsushkov committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 snippets/php.snippets
View
10 snippets/php.snippets
@@ -190,3 +190,13 @@ snippet observe
{
}
+snippet adminaction
+ public function ${1:some}Action()
+ {
+ try {
+ ${2}
+ } catch (Exception $e) {
+ $this->_getSession()->addError($e->getMessage());
+ }
+ $this->_redirectReferer();
+ }

0 comments on commit 06dfe9f

Please sign in to comment.
Something went wrong with that request. Please try again.