Hi,

$aViewChain is used in oxWidgetControl class - it is used to handle all 
widgets. To get widget itself class use $oViewConf->getActiveClassName(), to 
get current view class, use $oViewConf->getTopActiveClassName(). And btw all 
widgets should extend oxWidget class.



Rimvydas


From: Lange, Björn 
Sent: Monday, December 03, 2012 6:11 PM
To: [email protected] 
Subject: [oxid-dev-general] How to access $oViewConf->getActiveClassName()in 
Widget-Template

Hi all, 

I did not find a way to get the active view name in a template, displayed by 
the new widget structure. OXID uses the "$aViewsChain" in the 
oxShopControl-Chain for loading the template, but i did not see a usage of this 
chain displaying a widget.

protected function _initializeViewObject($sClass, $sFunction, $aParams = null, 
$aViewsChain = null)
    {
        $myConfig = $this->getConfig();

        // creating current view object
        $oViewObject = oxNew( $sClass );

        // store this call
        $oViewObject->setClassName( $sClass );
        $oViewObject->setFncName( $sFunction );
        $oViewObject->setViewParameters( $aParams );

        $myConfig->setActiveView( $oViewObject );


        // init class
        $oViewObject->init();

        return $oViewObject;
    }

Can you give me a hint? $oViewConf->getActiveClassName() returns the 
widget-Class.

Regards,
Björn

-- 

_________________________________
WBL Konzept, Beerden & Lange GbR
Björn Lange
Geschäftsführender Gesellschafter
 
Luxemburger Straße 266
50937 Köln

Bilker Straße 34
40213 Düsseldorf

Telefon: 0211 942 120 31 | Fax: 0211 942 120 32
www.wbl-konzept.de | www.facebook.com/wbl.konzept | [email protected] 





--------------------------------------------------------------------------------
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to