[TYPO3-german] Extension in andere Extension einbinden
    S. Teuber 
    traveler_in_time at gmx.net
       
    Tue Nov 20 16:10:03 CET 2007
    
    
  
Hi Julian,
> Wie und wo kann ich denn nun eine Instanz des "Sixpack-Objekts" 
> erzeugen, 
Wo ist eigentlich egal - da, wo Du es brauchst.
Wie: So, wie man immer eine Instanz einer Klasse erzeugt. ;-)
$sixpackObj =& new tx_sixpack_pi1();
Oder, im TYPO3-Kontext etwas schöner:
$sixpackObj =& t3lib_div::makeInstance('tx_sixpack_pi1');
> diesem die notwendigen Konfigurationen übergeben und dann
Das ist schon etwas trickreicher. Du hast prinzipiell zwei Möglichkeiten, 
an die TypoScript-Konfiguration von sixpack zu kommen:
a) Du fischst Sie aus $GLOBALS['TSFE']
b) Du lässt TypoScript die Arbeit machen und übergibst es in der
   Konfiguration von bzd staff directory:
   plugin.tx_bzdstaffdirectory_pi1.sixpackConf < plugin.tx_sixpack_pi1
   ...und im PHP der staffdirectory entsprechend:
   $sixpackObj =& t3lib_div::makeInstance('tx_sixpack_pi1');
   $sixpackObj->conf = $this->conf['sixpackConf.'];
   Das funktioniert natürlich nur, wenn die TypoScript-Konfiguration 
   von sixpack *vor* der o.g. Zeile erfolgt.
> auf dessen Methoden zugreifen?
Über die lokale Instanz:
$sixpackObj->meineMethode();
Liebe Grüße,
Sven
    
    
More information about the TYPO3-german
mailing list