I am creating a custom component and I just want to get the value from the global configuration in my controller. I can not find information on how to do this.
Sort of...
$config = JFactory::getConfig(); $this->_db = $config->get('db');
The documentation on how to do this is a bit outdated:
http://docs.joomla.org/JFactory/getConfig
But if you check the code, they will actually reset the ampersand function:
https://github.com/joomla/joomla-cms/blob/staging/components/com_users/models/registration.php
$config = JFactory::getConfig(); $fromname = $config->get('fromname');
Also, if you are trying to connect to a database, you can really just use the DB object from JFactory.
$db = JFactory::getDbo();
:
http://docs.joomla.org/Accessing_the_database_using_JDatabase
Joomla 3.2:
JFactory::getApplication()->get($varname, $default);
Source: https://habr.com/ru/post/1526349/More articles:Automatic deployment when saving a Netbeans entreprise project using maven - maven-2cancel the JSON array stored in javascript variable - jsonangular Nested -ui-router states do not work with multiple views - angularjsCustom directives on AngularJS pages without a special set of ng-app modules - javascriptStrip prefix on attribute value - xpathArray inside structure - c ++Google Maps in the Windows Store app (C # / XAML) - No scaling - windows-store-appsIs it possible to find an element as a button and click on it when it is constantly moving on? for example, carousel - ruby | fooobar.comREST API integration tests with java / scala / groovy - javaIs it possible to improve the appearance of the svg header tooltip - html5All Articles