Permalink
Browse files

Add install magento snippet

  • Loading branch information...
1 parent 1b05b23 commit 3d25e54a380702bf92bbe3b1cdf8f46cdbe660e1 @vsushkov committed Nov 26, 2012
Showing with 12 additions and 15 deletions.
  1. +12 −15 snippets/php.snippets
View
@@ -123,7 +123,7 @@ snippet ai
$this->assertInstanceOf('${1:Class_Name}', $${2:object});${3}
snippet lf
@loadFixture
- * @doNotIndexAll
+ @doNotIndexAll
snippet lsf
@loadSharedFixture
* @doNotIndexAll
@@ -184,19 +184,16 @@ snippet tdac
}
snippet here
- echo 'Hi, I am ' . __METHOD__ . '(' . __LINE__ . ')'; echo '<br />';
-snippet observe
- public function ${1:methodName}(Varien_Event_Observer $observer)
- {
+ echo 'Hi, I am ' . __FILE__ . '(' . __LINE__ . ')'; echo '<br />';
+snippet install
+ $installer = $this;
+ $installer->startSetup();
+ try {
+ ${1}
+ } catch (Exception $e) {
+ Mage::logException($e);
}
-snippet adminaction
- public function ${1:some}Action()
- {
- try {
- ${2}
- } catch (Exception $e) {
- $this->_getSession()->addError($e->getMessage());
- }
- $this->_redirectReferer();
- }
+
+ $installer->endSetup();
+

0 comments on commit 3d25e54

Please sign in to comment.