config *method*

This commit is contained in:
Al 2018-04-26 11:01:46 +12:00 committed by GitHub
parent 5e134355f4
commit 83ae96d2e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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**