From the archive! Drupal 9: Extending Drupal Base Classes Without Overriding Constructors This article details a technique for injecting dependencies into constructors, forms, and plugins without needing to override the constructor. We break down how to use dependency injection and what the technique does to improve this in Drupal. Despite the article being written for Drupal 9, the technique is still relevant in Drupal 11. https://lnkd.in/eGJWv4EN #drupal #drupalDevelopment #hashbangcode
Drupal 9 Dependency Injection Without Constructor Override
More Relevant Posts
-
I was reminded about this article this week when look at a code review with someone. Thought I would post it for this weeks "From the archive" :)
From the archive! Drupal 9: Extending Drupal Base Classes Without Overriding Constructors This article details a technique for injecting dependencies into constructors, forms, and plugins without needing to override the constructor. We break down how to use dependency injection and what the technique does to improve this in Drupal. Despite the article being written for Drupal 9, the technique is still relevant in Drupal 11. https://lnkd.in/eGJWv4EN #drupal #drupalDevelopment #hashbangcode
To view or add a comment, sign in
-
New! Drupal 11: Building A "Load More" Feature For Paginating Nodes Using HTMX In this article a controller action is created to load some pages of content to display them as a list. New items can be appended to the existing list using a HTMX callback, creating a load more feature. https://lnkd.in/e4aV-fcc #drupal #drupal11 #drupalDevelopment #drupalHtmx #hashbangcode
To view or add a comment, sign in
-
New! Drupal 11: Creating A Tabbed Interface With HTMX This is part three of a series of articles looking at HTMX in Drupal. In this article we will be creating a tabbed interface in Drupal, where HTMX is used to power loading the data in a tab like section without reloading the page. https://lnkd.in/eZXvqPqS #drupal #drupalDevelopment #drupal11 #htmx #hashbangcode
To view or add a comment, sign in
-
🧠 Exploring Drupal Beyond Basics After getting introduced to Drupal, I wanted to go beyond the basics and understand how it actually works and what makes it different from traditional development. 🔹 Understanding Drupal Internals Drupal follows a modular architecture: ✔ Core – Handles essential functionalities like content management and user handling ✔ Modules – Extend features without building everything from scratch ✔ Themes – Control the design and presentation ✔ Database – Stores all content, configurations, and user data 🔹 How Drupal Works User Request → Drupal Core → Modules → Database → Response This gave me a clear idea of how dynamic websites are handled internally. 👉 Traditional approach → Build everything from scratch 👉 Drupal (CMS approach) → Configure, manage and extend 🔹 Key Takeaways ✔ Focus more on content structure and organization ✔ Use existing modules to save development time ✔ Understand when to choose CMS vs full coding approach #Drupal #WebDevelopment #Backend #CMS #PHP #LearningJourney
To view or add a comment, sign in
-
-
🚀 Drupal Performance Optimization – Quick Tips Working with Drupal? Here are some quick wins to boost performance: • Enable Page Cache + Dynamic Cache + BigPipe • Optimize Views (limit fields, use pagination) • Improve DB queries (indexes, avoid heavy joins) • Enable CSS/JS aggregation • Use CDN + Varnish • Remove unused modules • Optimize images (WebP + Lazy Load) • Use Cron & Queues for heavy tasks • Monitor with tools like New Relic / Blackfire • Upgrade to latest Drupal + PHP 8 🔥 Small changes = Big performance gains #Drupal #WebDevelopment #Performance #DevTips
To view or add a comment, sign in
-
Drupal plugins are a flexible and powerful system used to extend and customize functionality within Drupal. They allow developers to define reusable components that can be dynamically discovered and used by the system. The Plugin module enhances Drupal core's plugin system by providing additional features and tools for managing custom plugin types. I would like to share a session from DrupalCamp NJ, titled "Taste the Power of Drupal Plugins!" with more information on how Drupal plugins work. #Drupal #Drupal10 #Drupal11 #DrupalCore #DrupalPlugins #DrupalDevelopment #YAML #BlockConfig #PluginModule #PHP #PHPAttributes #DrupalCampNJ #DrupalCampNJ2026 https://lnkd.in/e_tUgamN
Taste the Power of Drupal Plugins!
https://www.youtube.com/
To view or add a comment, sign in
-
After 8 years, I cleaned up and refactored my UltimateDrupalReference repository. It is now a more curated, practical reference for modern Drupal developers and site builders, and I'll keep updating it regularly. If you work with Drupal — or onboard people into Drupal projects — this might be useful: https://lnkd.in/eqXus2JV 🚀
To view or add a comment, sign in
-
I decided to learn Drupal from scratch yesterday. No prior experience — just a Rails/Vue background and a blank folder on my desktop. 24 hours later: • Local Drupal 10 site up and running • Custom content type with fields • Querying entities in a REPL like it’s Rails console The biggest shift for me wasn’t technical — it was conceptual. Drupal isn’t really a CMS you build in. It’s a platform you extend from within. Content types, fields, permissions, views… it’s all structured, exportable YAML that you commit to git and deploy like code. That reframing changed how I see it entirely. If you’ve written Drupal off as old or overly complex, it might be worth another look. Under the hood, the modern stack (Symfony, Composer, Twig, JSON:API) is serious engineering. Still early days — but it’s starting to click.
To view or add a comment, sign in
-
-
It's live. Same day. 🎉 This morning I wrote about building a headless Drupal CMS for a food truck client — choosing the hard path on purpose to learn a platform I need to know. By this evening, it's running in production. A Drupal instance on Render, feeding content into a Vue.js frontend via JSON:API. The client logs in, edits their menu, and the site updates. Exactly what I set out to build. The honest truth? Connecting Drupal up as a headless CMS was surprisingly straightforward. JSON:API ships with Drupal core. CORS config is a few lines in a YAML file. The content modelling just makes sense once you've done it once. Were there bumps? Of course. Ephemeral container filesystems. Apache config that silently ignored .htaccess. A CORS header that took 30 seconds to fix but felt like an hour to diagnose. But here's what made the difference — I paired with Claude as my guide throughout. Not just asking questions, but working through the architecture together, debugging in real time, and having someone (something?) that could see the whole picture at once. It's a genuinely different way to learn. You're not waiting for Stack Overflow. You're not skimming docs hoping the answer is on this page. You're just building, and getting unstuck fast. One client site. One day. Whole lot of Drupal reps logged. More to come. #Drupal #Vue #HeadlessCMS #WebDevelopment #LearningInPublic #BuildInPublic #ClaudeAI
To view or add a comment, sign in
-
-
Starting a new local Drupal project still has more friction than it should. So I built a one-line installer for it and wrote a short post about the thinking behind it. https://lnkd.in/dku2BZzR
To view or add a comment, sign in