[TYPO3-german] Versuch den inhalt einer anderen extension aus der eigenen extension herraus zu manipulieren und auszugeben

Oliver Leitner shadow333 at gmail.com
Fri Apr 17 23:52:09 CEST 2009


Hallo liebe Kollegen

Ich spiele mich gerade mit einer test extension, in der ich versuche
an den mailformplus output vorerst einmal ein hello world drann zu
haengen...

Bis jetzt bin ich soweit:

1. extension im kickstarter erstellt...
2. die pi1 klasse soweit angepasst:

...
...
...
/**
 * [CLASS/FUNCTION INDEX of SCRIPT]
 *
 * Hint: use extdeveval to insert/update function index above.
 */

require_once(PATH_tslib.'class.tslib_pibase.php');
include('typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php');
...
...
...
class tx_extovertest_pi1 extends tslib_pibase {
        var $prefixId      = 'tx_thmailformplus_pi1';           //
Same as class name
        var $scriptRelPath = 'pi1/class.tx_thmailformplus_pi1.php';
 // Path to this script relative to the extension dir.
        var $extKey        = 'th_mailformplus'; // The extension key.
        var $pi_checkCHash = true;

        /**
         * The main method of the PlugIn
         *
         * @param       string          $content: The PlugIn content
         * @param       array           $conf: The PlugIn configuration
         * @return      The content that is displayed on the website
         */
        function main($content, $conf) {
                $this->conf = $conf;
                $this->pi_setPiVarDefaults();
                $this->pi_loadLL();
                $GLOBALS['TSFE']->no_cache = 1;
...
...
...
$conf_thm = new tx_thmailformplus_pi1;
print_r($conf_thm);
...
...
...
if (defined('TYPO3_MODE') &&
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php'])
{
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php']);
}
...
...
...

wenn ich probiere die main funct aus der th mailformplus klasse anzugreifen mit:

return $conf_thm->main($conf_thm->content,$conf_thm->conf);

werde ich mit folgenden fehlern quittiert:

Warning: array_merge() [function.array-merge]: Argument #1 is not an
array in /var/www/xxx/typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php
on line 124

und dann weiter unten:

Fatal error: Call to a member function getSubpart() on a non-object in
/var/www/xxx/typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php
on line 698


Was mache ich hier falsch?

lg
-- 
Oliver Leitner
http://www.neverslair-blog.net


More information about the TYPO3-german mailing list