Reputation: 1049
I am reading typo3 extension file, and saw below codes:
function main($content, $conf) {
$this->conf = $conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->template = $this->cObj->fileResource($this->conf['templateFile']);
$GLOBALS['TSFE']->set_no_cache();
I used var_dump($conf);
to output $conf
, it shows:
array(53) { ["includeLibs"]=> string(47) "typo3conf/ext/jc_job/pi1/class.tx_jcjob_pi1.php" ["userFunc"]=> string(18) "tx_jcjob_pi1->main" ["templateFile"]=> string(28) "EXT:jc_job/pi1/template.html" ["pidList"]=> string(1) "7" ["code"]=> string(4)...
From the result, I can tell some configurations are from this file: ext_typoscript_setup.txt
, but some not.
SO my question is:
what is inside $conf
? or what files compose $conf
?
Upvotes: 1
Views: 538
Reputation: 347
The end result of $conf
is essentially Typoscript from plugin.tx_yourextension_pi1
.
This will be what is in ext_typoscript_setup.txt
of your extension, plus any changes made along the way. For example in the main template, you can also make changes to the plugin's configuration.
Upvotes: 1
Reputation: 3631
Your Plugin is configured via:
plugin.tx_yourextension_pi1 {
# these values will you have in $conf
someValue = well where it goes?
wrap = wrap|me
something {
different = 1
}
}
So $conf will look like this:
$conf = array(
'someValue' => 'well where it goes?',
'wrap' => 'wrap|me',
'something.' => array(
'different' => '1',
)
)
Upvotes: 1