Is there a built in way to get a plugin's information that is supplied by the user?For example,        return array(            'url_jasper_server' => new TextboxField (array(                'url'    => 'url_jasper_server',                'label' => 'URL of Jasper Server',                'configuration' => array(                    'desc' => 'Full URL of the Jasper Server')                            )),Do I need to do a SELECT from the database to get the data, or is there a function somewhere to get it?  I looked at some of the objects $ost, $cfg, but didn't see it.

Inside the plugin, you want: $config = $this->getConfig();For specific variables, you can use:$server = $this->getConfig()->get('url_jasper_server');If you are outside the plugin, you'll need to expose the variable.. like:in your class:/** * @[deleted] string $server The Jasper Server */public static $server;function bootstrap(){...// Set the url so other code can find it.self::$server = $this->getConfig()->get('url_jasper_server');...}Then anywhere else, you can use:$server = YourPluginClass::$serverAssuming your plugin get's loaded before that does..  I had a look through your repo, and was going to suggest this actually, you beat me to it! I'm actually interested in JasperReports now, looks interesting. 

I set these, self::$jasper_server = $this->getConfig()->get('url_jasper_server'); self::$jasper_server_ssl = $this->getConfig()->get('ssl_jasper_server');but the controller cannot see them.  I thought the main plugin file would load before the controller.

Write a Reply...