mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS: Document new stateless plugins
This commit is contained in:
parent
19af9cfc13
commit
e69cfd152e
@ -126,7 +126,7 @@ Plugins have to be registered with Injector.
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
|
||||
constructor:
|
||||
myPlugin: '%$MyProject\Plugins\MyPlugin'
|
||||
- 'MyProject\Plugins\MyPlugin'
|
||||
```
|
||||
|
||||
[info]
|
||||
|
@ -73,7 +73,7 @@ Let's register the plugin:
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
|
||||
constructor:
|
||||
truncate: '%$MyProject\Plugins\Truncator'
|
||||
- 'MyProject\Plugins\Truncator'
|
||||
```
|
||||
|
||||
And now we can apply it to any string field we want:
|
||||
|
@ -246,8 +246,8 @@ Back to Injector:
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
|
||||
constructor:
|
||||
geocodeQuery: '%$MyProject\Plugins\GeocodableQuery'
|
||||
geocodeDataObject: '%$MyProject\Plugins\GeocodableDataObject'
|
||||
- 'MyProject\Plugins\GeocodableQuery'
|
||||
- 'MyProject\Plugins\GeocodableDataObject'
|
||||
```
|
||||
|
||||
### Step 6: Apply the plugins
|
||||
|
Loading…
Reference in New Issue
Block a user