|
|
há 7 anos atrás | |
|---|---|---|
| .. | ||
| modules | há 7 anos atrás | |
| src | há 7 anos atrás | |
| .editorconfig | há 7 anos atrás | |
| .gitignore | há 7 anos atrás | |
| .travis.yml | há 7 anos atrás | |
| CHANGELOG.md | há 7 anos atrás | |
| CONTRIBUTING.md | há 7 anos atrás | |
| LICENSE | há 7 anos atrás | |
| LICENSE.txt | há 7 anos atrás | |
| README.md | há 7 anos atrás | |
| composer.json | há 7 anos atrás | |
| context.info.yml | há 7 anos atrás | |
| context.install | há 7 anos atrás | |
| context.module | há 7 anos atrás | |
| context.routing.yml | há 7 anos atrás | |
| context.services.yml | há 7 anos atrás | |
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.