New answers tagged settings
4
votes
How do i get variables from general.php
It is considered best practice to use the public get methods, so while the Craft 3 answer is correct, you should try to get in the habit of calling the methods.
Craft::$app->getConfig()->...
Top 50 recent answers are included
Related Tags
settings × 55plugin-development × 22
craft3 × 9
control-panel × 5
emails × 5
templating × 4
config × 4
admin × 4
plugin-craftcommerce × 3
plugins × 3
php × 3
localization × 2
form × 2
field × 2
redactor × 2
url × 2
error-message × 2
fieldtypes × 2
environmentvariables × 2
projectconfig × 2
entries × 1
assets × 1
users × 1
entry × 1
cache × 1