[Flow] Access settings in Model

David Sporer david.sporer at gmail.com
Fri May 15 17:19:57 CEST 2015


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 		 	   		  


More information about the Flow mailing list