Permalink
Browse files

Add adminaction Magento snippet

  • Loading branch information...
vsushkov committed Nov 22, 2012
1 parent 510d2a1 commit 06dfe9f4fb8e86e23276c536c8d664542e7b8c8b
Showing with 10 additions and 0 deletions.
  1. +10 −0 snippets/php.snippets
View
@@ -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.