-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PBC-3017 Added AppKernel documentation. #2239
PBC-3017 Added AppKernel documentation. #2239
Conversation
docs/acp/user/app-kernel.md
Outdated
|
||
### Configure | ||
|
||
Add a class that implements `\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\RequestValidatorPluginInterface` and add it to `\Pyz\Glue\AppKernel\AppKernelDependencyProvider::getRequestConfigureValidatorPlugins()` on the project level when needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we do this to set up the Configure action? Why do we say "on the project level when needed" Is it an optional step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's an optional step that might not be required by every App.
docs/acp/user/app-kernel.md
Outdated
|
||
In some cases, you need to do additional things with the passed configuration e.g. sending a request to a third-party application, or manipulating the data before it gets saved into the database. | ||
|
||
You can add two plugins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where should they be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationBeforeSavePlugin()
\Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationAfterSavePlugin()
Already written here https://github.com/spryker/spryker-docs/pull/2239/files#diff-ea6d8614a903c2b155ec7b2e6be0e98fbfe9a4aa7e142669a0e6595057ea8894R69-R70
docs/acp/user/app-kernel.md
Outdated
|
||
These plugins will be executed inside of the `\Spryker\Zed\AppKernel\Business\Writer\ConfigWriter::doSaveAppConfig()` method in a transaction. When you need to do some business logic for your App then you can use those plugins to do so and add them to the corresponding method in the \Pyz\Zed\AppKernel\AppKernelDependencyProvider on the project level when needed. | ||
|
||
The following methods can be used to attach your plugins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by "attach your plugins"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means adding them to the dependency provider.
docs/acp/user/app-kernel.md
Outdated
|
||
In some cases, you need to do additional things before the Tenant gets disconnected from an App (configuration will be deleted). | ||
|
||
You can add two plugins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where should they be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationBeforeDeletePlugin()
\Pyz\Zed\AppKernel\AppKernelDependencyProvider::getConfigurationAfterDeletePlugin()
But this information is already written here https://github.com/spryker/spryker-docs/pull/2239/files#diff-ea6d8614a903c2b155ec7b2e6be0e98fbfe9a4aa7e142669a0e6595057ea8894R85-R86
…blish-the-documentation
…blish-the-documentation
PR Description
Added documentation for the new AppKernel.
https://spryker.atlassian.net/browse/PBC-3017
Checklist