[Flow] Access settings in Model

David Sporer david.sporer at gmail.com
Fri May 15 18:59:47 CEST 2015


Thanks!
Didn’t know that but it works fine :-)


> Am 15.05.2015 um 17:21 schrieb Zedd <zedd at akii.de>:
> 
> Hi,
> 
> annotate the property with @Flow\Transient.
> 
>> On 15 May 2015, at 17:19, David Sporer <david.sporer at gmail.com> wrote:
>> 
>> Hi,
>> is there a way to access the settings in a Model?If I do this by just injecting it like this, doctrine will create a settings column in the database:/**
>>        * @var array
>>        */
>>       protected $settings;
>> 
>>       /**
>>        * Inject the settings
>>        *
>>        * @param array $settings
>>        * @return void
>>        */
>>       public function injectSettings(array $settings) {
>>               $this->settings = $settings;
>>       }
>> 
>> I have a setting that affects how certain properties are returned and would like to change this directly in the getter.E.g.if($settings['mysetting']) {    // do something} else {   // do another thing}
>> Is this possible or should I choose another way to do this?
>> Regards,David 		 	   		  
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
> 
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list