[FLOW3-general] Inject Facebook-API-Object

"Christian Müller (Kitsunet)" christian.mueller at typo3.org
Thu Nov 10 10:04:14 CET 2011


Very simple,

add this:

	/**
	 * @var array
	 */
	protected $settings;

	/**
	 * @param array $settings
	 * @return void
	 */
	public function injectSettings(array $settings) {
		$this->settings = $settings;
	}

And you will have your packages settings in the array (which means every 
configuration from Settings.yaml files that starts with your vendor + 
package). Example see TYPO3.MailForm which has settings for itself and 
for the TYPO3.TYPO3CR package in Settings.yaml.

Christian


On 10/11/11 09:28, Bernhard Marx wrote:
> Hi,
>
> sorry I forgot:
>
> Do you have a sample for a package-config... or a link where to read
> about it ?
>
> Thx
>
> Bernhard
>
>
>
>
> Von: "Christian Müller (Kitsunet)"
> Gesendet: Do 10.11.2011 09:18
> An: flow3-general at lists.typo3.org
> Betreff: Re: [FLOW3-general] Inject Facebook-API-Object
>
>
>> Hello,
>>
>> I would even create a separate Package "Facebook" for them and add a
>> wrapper class that extends the Facebook Class.
>
> As a little follow up... If you do that, it would be great to have this
> package made public and added to forge and git.
>
> cheers,
> Christian
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general




More information about the FLOW3-general mailing list