[Flow] Access settings in Model

Zedd zedd at akii.de
Fri May 15 17:21:40 CEST 2015


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



More information about the Flow mailing list