Banner Erweiterung - Attribute

Ich versuche derzeit das Banner Modul um weitere Attribute zu erweitern. Die Installation funktioniert auch ohne Probleme und die Attribute werden auch korrekt in der Datenbank unter ‚s_emarketing_banners_attributes‘ erstellt. Allerdings werden die Backend Views nicht korrekt überschrieben bzw. erweitert. Leider habe ich unter ‚_default/backend/banner/model/‘ auch keine schon existente js Datei mit attribute Model gefunden, wie sie z.B. in ‚_default/backend/customer/model/‘ vorhanden ist. Ich komme im Moment leider nicht weiter und bitte deshalb um ein wenig Hilfe. :oops: Bootstrap.php (noch ohne Meta.php) [code]<?php class Shopware_Plugins_Backend_BannerExtender_Bootstrap extends Shopware_Components_Plugin_Bootstrap
{

public function getCapabilities()
{
    return array(
        'install' => true, 'enable' =\> true, 'update' =\> true ); } public function install() { $metaDataCache = Shopware()-\>Models()-\>getConfiguration()-\>getMetadataCacheImpl(); $metaDataCache-\>deleteAll(); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr1', 'VARCHAR(255)', true, null ); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr2', 'VARCHAR(255)', true, null ); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr3', 'VARCHAR(255)', true, null ); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr4', 'VARCHAR(255)', true, null ); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr5', 'VARCHAR(255)', true, null ); Shopware()-\>Models()-\>addAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr6', 'VARCHAR(255)', true, null ); $metaDataCache = Shopware()-\>Models()-\>getConfiguration()-\>getMetadataCacheImpl(); $metaDataCache-\>deleteAll(); Shopware()-\>Models()-\>generateAttributeModels( array('s\_emarketing\_banners\_attributes') ); $this-\>subscribeEvent( 'Enlight\_Controller\_Action\_PostDispatch\_Backend\_Banner', 'postDispatchBanner' ); return array('success' =\> true, 'invalidateCache' =\> array('backend', 'proxy')); } public function uninstall() { Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr1' ); Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr2' ); Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr3' ); Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr4' ); Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr5' ); Shopware()-\>Models()-\>removeAttribute( 's\_emarketing\_banners\_attributes', 'beon', 'attr6' ); $metaDataCache = Shopware()-\>Models()-\>getConfiguration()-\>getMetadataCacheImpl(); $metaDataCache-\>deleteAll(); Shopware()-\>Models()-\>generateAttributeModels( array('s\_emarketing\_banners\_attributes') ); return true; } public function postDispatchBanner(Enlight\_Event\_EventArgs $args) { $args-\>getSubject()-\>View()-\>addTemplateDir( $this-\>Path() . 'Views/' ); if ($args-\>getRequest()-\>getActionName() === 'load') { $args-\>getSubject()-\>View()-\>extendsTemplate( 'backend/bannerextender/banner/model/banner\_detail.js' ); $args-\>getSubject()-\>View()-\>extendsTemplate( 'backend/bannerextender/banner/view/main/banner\_form.js' ); $args-\>getSubject()-\>View()-\>extendsTemplate( 'backend/bannerextender/banner/view/main/banner\_form\_add.js' ); } } }[/code] [b] Views\backend\bannerextender\banner\model\banner\_detail.js[/b] [code]//{block name="backend/banner/model/banner/fields" append} { name: 'beonAttr1', type: 'string' }, { name: 'beonAttr2', type: 'string' }, { name: 'beonAttr3', type: 'string' }, { name: 'beonAttr4', type: 'string' }, { name: 'beonAttr5', type: 'string' }, { name: 'beonAttr6', type: 'string' }, //{/block}[/code] [b]Views\backend\bannerextender\banner\view\banner\_form.js[/b] [code]//{block name="backend/banner/view/main/banner\_form" append} Ext.override(Shopware.apps.Banner.view.main.BannerForm, { createFormPanel: function() { var me = this, fields = me.callParent(arguments); fields.push({ name:'attribute[attr1]', fieldLabel:'{s name=form/attr1}Attribut 1{/s}' }); fields.push({ name:'attribute[attr2]', fieldLabel:'{s name=form/attr2}Attribut 2{/s}' }); fields.push({ name:'attribute[attr3]', fieldLabel:'{s name=form/attr3}Attribut 3{/s}' }); fields.push({ name:'attribute[attr4]', fieldLabel:'{s name=form/attr4}Attribut 4{/s}' }); fields.push({ name:'attribute[attr5]', fieldLabel:'{s name=form/attr5}Attribut 5{/s}' }); fields.push({ name:'attribute[attr6]', fieldLabel:'{s name=form/attr6}Attribut 6{/s}' }); return fields; } }); //{/block}[/code] [b]Views\backend\bannerextender\banner\view\banner\_form\_add.js[/b] [code]//{block name="backend/banner/view/main/banner\_form\_add" append} Ext.override(Shopware.apps.Banner.view.main.BannerFormAdd, { createFormPanel: function() { var me = this, fields = me.callParent(arguments); fields.push({ name:'attribute[attr1]', fieldLabel:'{s name=form\_add/attr1}Attribut 1{/s}' }); fields.push({ name:'attribute[attr2]', fieldLabel:'{s name=form\_add/attr2}Attribut 2{/s}' }); fields.push({ name:'attribute[attr3]', fieldLabel:'{s name=form\_add/attr3}Attribut 3{/s}' }); fields.push({ name:'attribute[attr4]', fieldLabel:'{s name=form\_add/attr4}Attribut 4{/s}' }); fields.push({ name:'attribute[attr5]', fieldLabel:'{s name=form\_add/attr5}Attribut 5{/s}' }); fields.push({ name:'attribute[attr6]', fieldLabel:'{s name=form\_add/attr6}Attribut 6{/s}' }); return fields; } }); //{/block}[/code]