oliverdavies.uk/content/node.312fd370-dae0-41b9-977f-282fc553e701.yml

72 lines
3.5 KiB
YAML

uuid:
- value: 312fd370-dae0-41b9-977f-282fc553e701
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:55+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'Releasing a Drupal module template'
created:
- value: '2022-09-22T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:55+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2022/09/22/releasing-drupal-module-template
langcode: en
body:
- value: |
<p>Today, I an the idea to create a reusable template for new Drupal modules, based on how I like to build modules and how I've shown others to do so in my Drupal testing workshop.</p>
<p>So I did, and released it for free <a href="https://github.com/opdavies/drupal-module-template">on my GitHub account</a>.</p>
<p>Like my Tailwind CSS starter theme on Drupal.org, it's not intended to be added as a module directly, but something that can be cloned and used as a base for people's own modules.</p>
<p>It includes an example route and Controller that load a basic page, and has a test to ensure that the page exists and loads correctly.</p>
<p>The Controller is defined as a service and uses autowiring to automatically inject the its dependencies, the same as in my workshop example code.</p>
<p>It's the initial release so it's rough around the edges still. I'll use it tomorrow to create a new module and document the steps to add to the README as well as other pieces of documentation.</p>
<p>If you're creating a new Drupal module and try it out, start a discussion on the GitHub repository or <a href="https://twitter.com/opdavies">let me know on Twitter</a>. If you have questions, create a discussion or just reply to this email and I'll get back to you.</p>
format: full_html
processed: |
<p>Today, I an the idea to create a reusable template for new Drupal modules, based on how I like to build modules and how I've shown others to do so in my Drupal testing workshop.</p>
<p>So I did, and released it for free <a href="https://github.com/opdavies/drupal-module-template">on my GitHub account</a>.</p>
<p>Like my Tailwind CSS starter theme on Drupal.org, it's not intended to be added as a module directly, but something that can be cloned and used as a base for people's own modules.</p>
<p>It includes an example route and Controller that load a basic page, and has a test to ensure that the page exists and loads correctly.</p>
<p>The Controller is defined as a service and uses autowiring to automatically inject the its dependencies, the same as in my workshop example code.</p>
<p>It's the initial release so it's rough around the edges still. I'll use it tomorrow to create a new module and document the steps to add to the README as well as other pieces of documentation.</p>
<p>If you're creating a new Drupal module and try it out, start a discussion on the GitHub repository or <a href="https://twitter.com/opdavies">let me know on Twitter</a>. If you have questions, create a discussion or just reply to this email and I'll get back to you.</p>
summary: null
field_daily_email_cta: { }