Implement @plugin.manager.condition

Created on 17 April 2023, over 1 year ago
Updated 18 April 2023, over 1 year ago

Problem/Motivation

We could benefit from @plugin.manager.condition. This allows the user to define (with negate option) where the script should be activated.

Check bothive chatbot for an example integration.

To-Do

In short. For the form:

Dependency injection: https://git.drupalcode.org/project/bothive/-/blob/1.0.x/src/Form/Bothive...
Setting Default conditions in the form: https://git.drupalcode.org/project/bothive/-/blob/1.0.x/src/Form/Bothive...
Adding the form elements: https://git.drupalcode.org/project/bothive/-/blob/1.0.x/src/Form/Bothive...
Saving the conditions: https://git.drupalcode.org/project/bothive/-/blob/1.0.x/src/Form/Bothive...

For the hook_page_attachments logic:
https://git.drupalcode.org/project/bothive/-/blob/1.0.x/src/Controller/B...

Also do some more housekeeping in the .module file and maybe extract some parts to a controller/helper class so we can benefit from dependency injection as well.

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇧🇪Belgium BramDriesen Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024