Application Settings stored in the DB and available in plugin models?
Hi, I have some settings set in the admin area and stored in the db
that i use throughout the app, and would like to access in a plugin.
I get the settings like this in the app controller:
function _getSettings(){
$this->settings = $this->Setting->find(); #get them
#make available in controllers
$this->settings = $this->settings['Setting'];
# make available in views
$this->set('settings',$this->settings);
#make available in plugins
// ??
}
But those variables are not availabe in a plugin model. How can I
make those settings available everywhere?
Settings writen using configure::write in the core.php file are
available, but not ones written in appController. Where can i write
them out from the DB so they are available in the plugin model?
Or am i going about this the wrong way entirely?
Thanks,
Will.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home