nuvoleweb / ui_patterns

[NOTE] Development has moved to https://drupal.org/project/ui_patterns
https://drupal.org/project/ui_patterns
GNU General Public License v2.0
85 stars 56 forks source link

Override pattern definitions #281

Open ignovski opened 4 years ago

ignovski commented 4 years ago

Hi, I am trying to override the pattern options in the views edit form on D8. In order to do this, I have to override the class of the Pattern plugin: $plugins['ui_patterns']['class'] = 'Drupal\\custom_module\\Plugin\\views\\row\\Pattern'; And then override the Form Trait in the Pattern class.

Since the getDefinitions() method is cached by the PatternManager, any altering hook to change the options does not work properly.

Is there another way to alter the options for the Pattern plugin?

Thanks in advance, Ivan