Skip to content

Conversation

@omkartidke42
Copy link
Contributor

Introduced a new omkar_pluginapi custom Drupal module demonstrating a pluggable architecture.
Created a Plugin Manager, Base Plugin class, Plugin Interface, and Annotation class.
Added a sample plugin (SampleSandwich) to demonstrate dynamic discovery.
Implemented a controller at route /omkar-pluginapi to list plugin data (label, description, calories).
Ensured service registration, routing, and plugin discovery is wired correctly.
🔐 Security:

Used $this->t() to prevent raw HTML injection via plugins. (XSS-safe)
📁 Structure:

src/Plugin/OmkarPluginapi/: Sandwich plugins
src/Controller/: Controller to display plugins
src/Annotation/: Annotation class for plugin metadata
src/OmkarPluginapiPluginManager.php: Handles discovery/caching
src/OmkarPluginapiInterface.php: Defines plugin contract
plugin
Screenshot from 2025-04-14 14-29-39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants