[TYPO3-ect] Extending Controller->_init

Sebastian Fischer s.fischer at b-und-h.de
Fri Dec 21 11:51:51 CET 2007


Hi everyone,

as I tried to use flexform configuration in my extension, I searched for a
method to get the flexform data. So I tried to use some given methods and
came to the point where I needed to extend the _init Method. My code reads
like this:

	function _init($input = NULL, $localConf = NULL, $parametersObject =
NULL) {
		parent::_init($input, $localConf, $parametersObject);
	
$this->setup->setFlexFormSetup($this->cObject->data['pi_flexform']);
	
$this->pluginSetup->setTypoScriptSetup($this->globalSetup->get($this->setupP
ath));
	}

In line 2 I call the parent method. Line 3 merges the flexform data into the
setup array and afterwards I merge the ts data again into the setup array,
because that should have priority over flexform (so admins have the last
word).

Is this way wrong in any kind? Is there a better solution?

Greetings
Sebastian

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.5/1191 - Release Date: 20.12.2007
14:14
 



More information about the TYPO3-team-extension-coordination mailing list