mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
config *method*
This commit is contained in:
parent
5e134355f4
commit
83ae96d2e1
@ -54,13 +54,13 @@ This can be done by calling the static method [Config::inst()](api:SilverStripe\
|
||||
$config = Config::inst()->get('MyClass', 'property');
|
||||
```
|
||||
|
||||
Or through the `config()` object on the class.
|
||||
Or through the `config()` method on the class.
|
||||
|
||||
```php
|
||||
$config = $this->config()->get('property')';
|
||||
```
|
||||
|
||||
You may need to apply the [Configurable](api:SilverStripe\Core\Config\Configurable) trait in order to access the `config()` object.
|
||||
You may need to apply the [Configurable](api:SilverStripe\Core\Config\Configurable) trait in order to access the `config()` method.
|
||||
|
||||
**mysite/code/MyOtherClass.php**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user