Merge pull request #9369 from mooror/patch-1

Added "owner system" limitation information to the Extension Docs
This commit is contained in:
Dylan Wagstaff 2020-01-13 11:49:21 +13:00 committed by GitHub
commit 547ac6f2ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,6 +249,10 @@ class MyMemberExtension extends DataExtension
}
```
[notice]
Please note that while you can read protected properties of the source object (using `$this->owner->protectedProperty`) you cannot call any of it's protected methods (`$this->owner->protectedMethod()` will not work). You also cannot access any of the source object's private properties or methods (`$this->owner->privateProperty` will not work either).
[/notice]
## Checking to see if an Object has an Extension
To see what extensions are currently enabled on an object, use the [getExtensionInstances()](api:SilverStripe\Core\Extensible::getExtensionInstances()) and