|
|
преди 7 години | |
|---|---|---|
| .. | ||
| modules | преди 7 години | |
| src | преди 7 години | |
| .editorconfig | преди 7 години | |
| .gitignore | преди 7 години | |
| .travis.yml | преди 7 години | |
| CHANGELOG.md | преди 7 години | |
| CONTRIBUTING.md | преди 7 години | |
| LICENSE | преди 7 години | |
| LICENSE.txt | преди 7 години | |
| README.md | преди 7 години | |
| composer.json | преди 7 години | |
| context.info.yml | преди 7 години | |
| context.install | преди 7 години | |
| context.module | преди 7 години | |
| context.routing.yml | преди 7 години | |
| context.services.yml | преди 7 години | |
The context module lets you define conditions for when certain reactions should take place.
An example of a condition could be when viewing a certain node type and blocks should be placed as a reaction when viewing a page with this node type.
###Good resources
Context for Drupal 8 uses the built in condition plugins supplied by Drupal through the Plugin API. So any conditional plug-ins supplied by other modules can also be used with context.
Reactions for the context module are defined trough the new Drupal 8 Plugin API.
The context module defines a plugin type named Context Reaction that you can extend when creating your own plugins.
A context reaction requires a configuration form and execute method. The execution of the plugin is also something that will have to be handled by the author of the reaction.