Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions src/pages/development/components/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,13 @@ In the plugin class, the `setName` method may have one of the following names:

If the first letter in the name of the class method name for which you want to create a plugin is the `underscore` character, then you do not need to capitalize it in the plugin class.

For example, to create a plugin for the `_construct` method of some class:
You can use plugins (interceptors) on PHP magic methods, such as `__get`, `__set`, or `__call`. The Adobe Commerce and Magento Open Source dependency injection system allows interceptors to wrap these magic methods just like standard public methods.

```php
...
public function _construct()
{
...
}
...
```

Use the following method names for the `_construct` method in the plugin class:
Use the following method names for the `_get` method in the plugin class:

* `before_construct`
* `around_construct`
* `after_construct`
* `before_get`
* `around_get`
* `after_get`

## Before methods

Expand Down
Loading