Problem/Motivation
Plugin discovery allows retrieval of plugin definitions.
Most plugin types support an alter on that list, but the result of those alters is cached and can only be used to fully remove a single plugin.
If the list of plugins needs to be filtered at runtime, it is currently up to the code that uses the definitions to support their own filtering.
Proposed resolution
Provide a unified mechanism for retrieving a filtered list of plugin definitions.
Remaining tasks
User interface changes
N/A
API changes
API addition
Deprecate \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts()
Data model changes
N/A