Matt Glaman: Factories and dependency injection

Planet Drupal - Tue, 2023/05/30 - 3:08pm

Last week I wrote about dependency injection anti-patterns in Drupal. These anti-patterns occur when your service's constructor has logic that interacts with the injected dependent services beyond assigning them to properties. These anti-patterns include creating a new object from a factory or retrieving an object from a stack. However, Symfony's service container supports defining services built from factories. This can streamline your code and follow best practices when using dependency injection. Drupal uses this factory service design pattern for cache bins, loggers, and the HTTP client service.


clemens-tolboom deleted branch some-v3-changes at clemens-tolboom/gdUnit4

On github - Tue, 2023/05/30 - 10:44am
clemens-tolboom deleted branch some-v3-changes in clemens-tolboom/gdUnit4 · May 30, 2023 08:44 clemens-tolboom/gdUnit4

Updated May 30

clemens-tolboom deleted branch make_spinner_preloaded at clemens-tolboom/gdUnit4

On github - Tue, 2023/05/30 - 10:43am
clemens-tolboom deleted branch make_spinner_preloaded in clemens-tolboom/gdUnit4 · May 30, 2023 08:43 clemens-tolboom/gdUnit4

Updated May 30

clemens-tolboom opened a pull request in MikeSchulze/gdUnit4

On github - Tue, 2023/05/30 - 10:37am
clemens-tolboom opened MikeSchulze/gdUnit4#196 · May 30, 2023 08:37 Show test errors in full. #196

It would be cool to see the first error in full. This helps fixing the first bug faster. Before After Scene (not sure this one helps)

+4 -3

Peoples Blog: Drupal LMS Features for Your Education Business

Planet Drupal - Tue, 2023/05/30 - 5:45am
If you're running an education business and considering Drupal as the platform for your Learning Management System (LMS), there are several features and capabilities you should look for to ensure a robust and effective solution. Here are some key Drupal LMS features to consider: Course Management: A Drupal LMS should provide comprehensive course management capabilities. This includes the ab

Talking Drupal: Talking Drupal #401 - HTTP Headers

Planet Drupal - Mon, 2023/05/29 - 8:00pm

Today we are talking about HTTP Headers with our hosts.

For show notes visit:

  • What are HTTP Headers
  • Why are they important
  • Exploring headers
  • Types of headers
  • What can you discover from headers
  • Modifying headers
  • Tools to validate
Resources Hosts

Nic Laflin - @nicxvan John Picozzi - @johnpicozzi Stephen Cross - @stephencross Martin Anderson-Clutz - @mandclu

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Content-Security-Policy Adds a Content-Security-Policy header which allows your Drupal site to inform browsers of trusted sources for JavaScript, CSS, and other external resources.


LN Webworks: The Ultimate Drupal Security Checklist to Safeguard Your Website

Planet Drupal - Mon, 2023/05/29 - 9:13am

Cyber threats are escalating, and individuals are actively prioritizing their online safety by verifying website authenticity and safeguarding private data. Even with considerable efforts, websites are not immune to malware, brute force attacks, SQL injections, and DDoS attacks, posing a constant risk of unauthorized access and the compromise of customer information.

Hackers don't just target large corporations, but according to a report by AdvisorSmith, 42% of small-medium businesses are affected by these cyber attacks. That's why following a proven Drupal security checklist is imperative to safeguard your business against hackers or other malicious actors. With the right strategy and careful planning, you can make your website robust and avoid these potential threats. Read the full article, consider these 17 security checklists, and thrive in your business.


The Drop Times: A Journey of Growth and Transformation

Planet Drupal - Mon, 2023/05/29 - 8:27am

Today, let us deeply explore life's journey and the various phases we all experience. Like a captivating story, life unfolds through diverse chapters that offer unique lessons, challenges, and opportunities for personal growth and transformation. Let's embark on this exploration together and discover the beauty in embracing the different phases of life.

The Spring of Youth: Embracing Boundless Possibilities

Youth—the phase of exuberance and discovery. During this period, we plant the seeds of our dreams and ambitions, exploring the world with curiosity and an unyielding spirit. Let's celebrate the energy and potential of youth and cherish the memories we create along the way.

The Summer of Exploration: Embracing Self-Discovery

As we transition into adulthood, we enter the summer of our lives. This phase invites us to embark on a journey of self-discovery, to dive deep into our identities, values, and aspirations. It's a time to explore various paths, make important life choices, and build the foundation for our future. Let's embrace this season of exploration and savor the joy of discovering who we indeed are.

The Autumn of Wisdom: Embracing Growth and Reflection

In the autumn of life, we find ourselves at a crossroads—a time of introspection and reflection. This phase offers an opportunity to reap the wisdom accumulated through experiences, reflect on our achievements, and redefine our priorities. Let's celebrate the wealth of knowledge we have acquired and embrace the beauty of personal growth that continues to unfold.

The Winter of Serenity: Embracing Transformation and Legacy

Winter, a season marked by serenity and introspection, represents the later stages of life. During this phase, we reflect on our accomplishments, pass down our wisdom to future generations, and leave a lasting legacy. Let's embrace the winter of life with grace, appreciating the profound impact we can make and the beauty of our journey.

As we navigate these phases, it's important to remember that life is not a linear path but a cycle of growth and transformation. Each stage brings challenges and rewards; by embracing them, we can fully appreciate the richness of our existence.

Now, Let's dive into the essential picks from the past week.

Last week, The Drop Times was privileged to conduct two insightful interviews. Our first interview was with Martin Anderson-Clutz, a distinguished speaker at EvolveDrupal in Montreal. In this interview, Martin shares his valuable insights on the challenges and prospects of Drupal. The second interview was with Marcin Maruszewski, an experienced Drupal professional. Marcin graciously shared his personal journey and extensive Drupal experience, offering valuable perspectives for newcomers and seasoned practitioners.

Kwall blog post delved into the intricacies of two of the most popular platforms in the web development realm: Drupal and WordPress. RS Websols published an informative blog titled "The Benefits of Using Drupal: Unleashing its Potential for Web Development."

A recently released research report focusing on the Content Management Systems (CMS) market for 2023-2030 provides valuable insights into the fundamental dynamics driving the sector. AltaGrade, a leading web development company, has published an informative blog post titled "Upgrading to Drupal 10: Why It's Important and How AltaGrade Can Help."

Drupar, a reliable source of Drupal tutorials, recently shared a step-by-step guide demonstrating how to create a new text format in Drupal without relying on CKEditor. DrupalCon, the premier conference for the Drupal community, has announced an enticing giveaway exclusively for attendees of DrupalCon Pittsburgh 2023. To know more information, visit here.

In a recently shared blog post, Drupal India highlights the compelling reasons for choosing Drupal CMS when developing fully functional and easily navigable travel agency websites. SystemSeed, a trusted source of Drupal expertise, has published a blog post offering tips and tricks for finding the ideal Drupal maintenance partner.

Stay tuned for more updates, interviews, and informative articles in the upcoming editions of The Drop Times. Feel free to contact us if you have any suggestions, contributions, or feedback. Thank you for being a part of our community!

That is all for the week.
Your's sincerely,

Kazima Abbas
Sub-Editor, TheDropTimes


#! code: Drupal 10: Using A Lazy Builder To Create A Dynamic Button

Planet Drupal - Sun, 2023/05/28 - 7:30pm

Adding dynamic and interactive elements to a web page can be a challenge, and there are a few techniques available in Drupal to allow for this.

One solution might be to add a form to the page, but this can cause problems with the cache system. Adding forms actually makes it slightly difficult to cache the page properly and you can easily see poor caching levels from pages containing forms.

Rather than adding a form to the site (and the complexities that come with that) it is possible to create a fully dynamic element that can be used to perform actions by the user. This is done using a combination of different techniques, all of which are built into Drupal and just need to be plugged together.

In this article I will look at using lazy builders to create a dynamic button that won't cause problems with the page cache, and will even work for anonymous users.

The Problem

For some context I thought I would talk about some of the work that went into putting this example together.

I was recently tasked to create a button on an Event content type that would act as the registration action for that event. The button needed to take into account different factors like the role of the user, the type of event, and the remaining capacity of the room. When the user clicked on the button they would be booked onto the event and the content of the button would change to inform them of this.

The button, therefore, needed to be fully dynamic for the user and the page they were visiting. In order to allow the button to be unique to each user and event I used a lazy builder to offset the generation of the button so that it wouldn't interfere with the caching of the page.

Read more


Lisa Streeter: Payment by Purchase Order

Planet Drupal - Sat, 2023/05/27 - 5:44pm
Payment by Purchase Order Saturday 27, May 2023 Lisa Streeter Sat, 05/27/2023 - 11:04 The Goal

A Drupal Commerce website may want to offer the same payment terms provided to customers purchasing products offline. If up-front payment is not required, then we need to create an option for customers to complete checkout without providing payment. Additional information may need to be collected during checkout for the "payment on account" option in lieu of a traditional payment method. For our business needs, this additional information takes the form of a Purchase Order number entered by the customer.


Quant Drupal Planet Blog Posts: Join us at DrupalCon Pittsburgh 2023 from June 5 to 8

Planet Drupal - Sat, 2023/05/27 - 12:30am
Join us at DrupalCon Pittsburgh 2023 from June 5 to 8

We are excited to be speaking next week at DrupalCon Pittsburgh 2023 about decoupled and static website solutions, Drupal community events, and how to make big things happen in Drupal.

kristen.pol Sat, 05/27/2023 - 08:30 June 01, 2023

clemens-tolboom commented on issue don-tnowe/godot-resources-as-sheets-plugin#24

On github - Fri, 2023/05/26 - 12:27pm
clemens-tolboom commented on don-tnowe/godot-resources-as-sheets-plugin#24 · May 26, 2023 10:27 clemens-tolboom commented May 26, 2023

TBH it confused me for long. It looks like the first (by name) resource is used to build the grid. But my own resource is complex same as the theme…

clemens-tolboom opened an issue in don-tnowe/godot-resources-as-sheets-plugin

On github - Fri, 2023/05/26 - 10:46am
clemens-tolboom opened an issue in don-tnowe/godot-resources-as-sheets-plugin · May 26, 2023 08:46 4.0 missing usage #24

When selecting a directory with different resource types: say custom theme and belt I get res://addons/resources_spreadsheet_view/import_export/fo…

clemens-tolboom opened a pull request in don-tnowe/godot-resources-as-sheets-plugin

On github - Thu, 2023/05/25 - 6:27pm
clemens-tolboom opened don-tnowe/godot-resources-as-sheets-plugin#23 · May 25, 2023 16:27 Update dock_texture.tscn #23

icon.png is gone in at least v4.0.3.stable.official [5222a99f5]

+1 -1

clemens-tolboom opened an issue in johnweven/godot-windows-95-theme

On github - Thu, 2023/05/25 - 6:12pm
clemens-tolboom opened an issue in johnweven/godot-windows-95-theme · May 25, 2023 16:12 Nice effort but ... #3

I initially thought it was a project theme ... not a editor theme. I looks awesome. Trying to uninstall the theme was a little harder. Enabling pl…