Methoden in allen views aufrufen

Hallo Zusammen,
ich habe eine Methode die ich gerne in allen Views nutzen möchte.

Laut Blogs und dem Forum hier kann man einfach die oxviewconfig erweitern. Aber das scheint bei mir nicht zu funktionieren.

[B][U]Hier mein Ansatz:[/U][/B]
[B]Mein Extend der oxviewconfig:[/B]


<?php
class myviewconf extends myviewconf_parent
{
    /**
     * @var object
     */
    protected $_oTest;
        
    /**
     * @param integer $shopid
     * @param integer $langid
     * @return object
     */
    public function getTestElements()
    {
        $this->_oTest = oxNew('myelementlist');
        $this->_oTest->loadTestElements();
        return $this->_oTest;
    }
}
?>

[B]Mein Model:[/B]

<?php
class myelementlist extends oxList
{
    /**
     * Call parent class constructor
     *
     * @param string $sObjectsInListName Associated list item object type
     *
     * @return null
     */
    public function __construct( $sObjectsInListName = 'test' )
    {
        parent::__construct( 'test' );
    }
    
    /**
     * @return object
     */
    public function loadTestElements()
    {
        $sViewName = getViewName( 'test');
        $sSelect = "SELECT * FROM {$sViewName}";        
        $this->selectString( $sSelect );
    }
}
?>

[B]Meine Smarty Ausgabe:[/B]


[{assign var=test value=$oViewConf->getTestElements()}]
[{$test|@var_dump}]

(Hier bekomm ich eine leere Seite als Ausgabe und die URL ändert sich auf index.php?cl=start&redirected=1 ).

[B]Mein EXCEPTIONLOG:[/B]
Faulty component --> tag
EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND

Was “Faulty component --> tag” damit zu tun hat weiß ich nicht, weil ich das ja überhaupt nicht nutze…

Mein $sSelect konnte ich var_dumpen. Also so weit scheint er schon mal zu kommen…

Hat jemand eine Idee warum ich keine Ausgabe hinbekomme?

Die Exception hat ja paar mehr Zeilen. Was steht da?

[B]Exception:[/B]

Faulty component --> tag
---------------------------------------------
oxSystemComponentException-oxException (time: 2013-03-12 12:27:12): [0]: EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND 
 Stack Trace: #0 /home/www/4.6.5_49955/htdocs/core/oxutilsobject.php(188): oxUtilsObject->_getObject('oxsystemcompone...', 0, Array)
#1 [internal function]: oxUtilsObject->oxNew('oxSystemCompone...')
#2 /home/www/4.6.5_49955/htdocs/core/oxfunctions.php(376): call_user_func_array(Array, Array)
#3 /home/www/4.6.5_49955/htdocs/core/oxutilsobject.php(178): oxNew('oxSystemCompone...')
#4 [internal function]: oxUtilsObject->oxNew('tag')
#5 /home/www/4.6.5_49955/htdocs/core/oxfunctions.php(376): call_user_func_array(Array, Array)
#6 /home/www/4.6.5_49955/htdocs/core/oxlist.php(366): oxNew('tag')
#7 /home/www/4.6.5_49955/htdocs/core/oxlist.php(394): oxList->getBaseObject()
#8 /home/www/4.6.5_49955/htdocs/modules/my/test/models/myelementlist.php(25): oxList->selectString('SELECT * FROM t..')
#9 /home/www/4.6.5_49955/htdocs/modules/my/test/extend/myviewconf.php(23): myelementlist->loadTestElements()
#10 /home/www/4.6.5_49955/htdocs/tmp/smarty/338d58ba9ef4c448cba7fe67c370da96^%%90^90B^90B7B94A%%base.tpl.php(37): myviewconf->getTestElements()
#11 /home/www/4.6.5_49955/htdocs/core/smarty/Smarty.class.php(1869): include('/home/www...')
#12 /home/www/4.6.5_49955/htdocs/tmp/smarty/338d58ba9ef4c448cba7fe67c370da96^%%36^366^366ECF91%%page.tpl.php(94): Smarty->_smarty_include(Array)
#13 /home/www/4.6.5_49955/htdocs/core/smarty/Smarty.class.php(1869): include('/home/www...')
#14 /home/www/4.6.5_49955/htdocs/tmp/smarty/338d58ba9ef4c448cba7fe67c370da96^%%40^405^405277AF%%start.tpl.php(48): Smarty->_smarty_include(Array)
#15 /home/www/4.6.5_49955/htdocs/core/smarty/Smarty.class.php(1263): include('/home/www...')
#16 /home/www/4.6.5_49955/htdocs/core/oxshopcontrol.php(629): Smarty->fetch('page/shop/start...', 'ox|http://www.t...')
#17 /home/www/4.6.5_49955/htdocs/core/oxshopcontrol.php(428): oxShopControl->_render(Object(Start))
#18 /home/www/4.6.5_49955/htdocs/core/oxshopcontrol.php(148): oxShopControl->_process('start', NULL, NULL, NULL)
#19 /home/www/4.6.5_49955/htdocs/core/oxid.php(32): oxShopControl->start()
#20 /home/www/4.6.5_49955/htdocs/index.php(40): Oxid::run()
#21 {main}

 Faulty component --> tag

versuch mal noch die Variable

private $_oBaseObject = "test";

hinzuzufügen
bzw wie auch immer deine Objekt-Classe heißt

Falls jemand mal hierdrüber stolpert:

Ich habe meine Liste noch um die Variablen hier erweitert.

[B]Auf mein Beispiel bezogen:[/B]
protected $_sClassName = ‘myelementlist’;
protected $_sCoreTable = ‘test’;
protected $_blUseLazyLoading = true;

Wobei LazyLoading sicherlich nicht zwingend nötig ist…