preprocessors-8.x-1.0-beta8/modules/preprocessors_example/preprocessors_example.preprocessors.yml
modules/preprocessors_example/preprocessors_example.preprocessors.yml
# Declare your plugin with an ID. Should be unique.
preprocessors_example.preprocessor.node_yaml:
class: '\Drupal\preprocessors_example\Plugin\preprocessors\NodePreprocessorYaml' # Namespace of the actual class! It's in this module.
hooks: # The hooks this plugin acts upon.
- node # Makes this plugin equivalent to hook_preprocess_node($variables, $hook, $info).
themes: '*'
weight: 1 # Determines execution order. This will run after the regular NodePreprocessor as it has more weight! The default weight is 0.
