Created
June 17, 2015 11:49
-
-
Save teiling88/f9b2bd10d1213d3a7a14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Bootstrap for ${NAME} | |
* @version | |
* @author TE [email protected] | |
*/ | |
class Shopware_Plugins_${namespace}_Bestit${name}_Bootstrap extends Shopware_Components_Plugin_Bootstrap | |
{ | |
/** | |
* Install plugin method | |
* | |
* @return bool | |
*/ | |
public function install() | |
{ | |
${DS}this->createEvents(); | |
${DS}this->createForms(); | |
${DS}this->installSql(); | |
return true; | |
} | |
/** | |
* mapping for template prio and adding template directory | |
*/ | |
public function init() | |
{ | |
${DS}templateDirs = Shopware()->Template()->getTemplateDir(); | |
array_unshift(${DS}templateDirs, ${DS}this->Path() . 'Views/'); | |
Shopware()->Template()->setTemplateDir(${DS}templateDirs); | |
} | |
/** | |
* getLabel function returns the label | |
* @return string | |
*/ | |
public function getLabel() | |
{ | |
return '${label}'; | |
} | |
/** | |
* Returns name of our company | |
* | |
* @return string | |
*/ | |
public function getAuthor() | |
{ | |
return 'best it Consulting GmbH & Co. KG'; | |
} | |
/** | |
* returns current version | |
* @return string | |
*/ | |
public function getVersion() | |
{ | |
return '0.0.0'; | |
} | |
/** | |
* function which subscribe all needed events | |
*/ | |
private function createEvents() | |
{ | |
${DS}this->subscribeEvent( | |
'Enlight_Controller_Dispatcher_ControllerPath_Backend_Controller', | |
'onGetControllerPathBackend' | |
); | |
} | |
/** | |
* function which creates all needed forms | |
*/ | |
private function createForms() | |
{ | |
} | |
/** | |
* function which executes all needed sql queries | |
*/ | |
private function installSql(){ | |
} | |
/** | |
* @return array | |
*/ | |
public function getInfo() | |
{ | |
return array( | |
'version' => ${DS}this->getVersion(), | |
'label' => ${DS}this->getLabel(), | |
'author' => ${DS}this->getAuthor(), | |
'copyright' => 'Copyright © ' . date('o') . ', best it Consulting GmbH & Co. KG', | |
'support' => '[email protected]', | |
'link' => 'http://www.bestit-online.de' | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment