SlideShare a Scribd company logo
1 of 22
Download to read offline
Drupal 7 Module Development
A Brief Introduction
Matt Mendonca
Background
• IT Specialist at the National Institute of
Standards and Technology
• 2+ years professional experience with Drupal
• Previously worked for VOX Global
(FleishmanHillard) and High Rock Studios
Content
• What are modules
• Why you should modularize your code
• What makes up a module
• What is the hook system
• How does that (magic) work
• Resources
• Make a module
Modules Are…
• Building blocks
• Encapsulated functionality
• Frameworks
• API’s
Why You Should Modularize
Your Code
• Code encapsulation
• Enable / disable code
• Cleanly extend core and / or contributed modules
• Prevents hacking other's code
• Preserves upgrade path
• https://www.drupal.org/best-practices/do-not-hack-core
• Share your code
• Allows your code to be extendable
Modules And Themes
• Make things work using modules
• Make things pretty using themes
• Developing modules allows you to keep logic
out of your themes
• Separation of concerns
Module Dissected
• Folder designated by the machine name of the
module (/sites/all/modules/dev/my_module)*
• Info file designated by the machine name of the
module (my_module.info)
• Module file designated by the machine name of
the module (my_module.module)
* Drupal’s module scanning is recursive; you can add folders with in the module
folder and it will find it. E.g. /sites/all/module/contrib | /sites/all/module/dev | etc.
Info File
• The .info file describes your module
• At the minimum describe name, description,
package, and core
Info File: Name
• Name is the user friendly name of your module
• E.g.
	 name = “My Module”
Info File: Description
• Description is the description of your module
• E.g.
	 description = “This my module.”
Info File: Package
• Package is the category of your module
• Groups modules together on the module admin
page
• E.g.
	 package = “User Interface”
Info File: Core
• Core is the major version of Drupal core that
your module is designed for
• E.g.
	 core = 7.x
Info File: Version
• Version describes which release your module is at
• By convention, version of Core followed by version of the
module
• Note: this is only to be filled out when your module is not on
Drupal.org
• E.g.
	 version = 7.x-1.0
Info File: Dependencies
• Dependencies is an array listing all the modules that your
module requires
• You do not need to list the dependencies of your
dependencies
• E.g.
	 dependencies[] = views
	 dependencies[] = panels
Info File: Configure
• Configure specifies the url of the module’s
configuration page (if any)
• Adds a configure link on the module admin
page
• E.g.
	 configure = admin/config/content/my-module
Module File
• The module file is the file that Drupal always
loads for enabled modules - always
• Should contain your bootstrap code / hooks
• When possible, store code in .inc files
(Captain) Hook
• The hooks system provides access points to
Drupal's response cycle
• Used by Modules and Themes (preprocessing)
• Like a roll call
How Does The Hook System
Work
• At certain points in Drupal's response cycle,
Drupal (and module's with hooks) will run hook-
able functions
• Lets explore: https://github.com/matt-
mendonca/hooks-explained
Modules That Don't Have Any
Hooks
• There are modules that don't use any hooks
• Use Case: loading a php library for use by other
modules
Resources
• https://www.drupal.org/developing/modules
• https://www.drupal.org/best-practices
• https://api.drupal.org/api/drupal
• https://drupal.stackexchange.com/
• https://stackoverflow.com/questions/tagged/drupal
• https://www.google.com/
Questions?
Lets Make A Module
!
https://github.com/matt-mendonca/example-d7-module

More Related Content

What's hot

Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011camp_drupal_ua
 
Midterm presentation
Midterm presentationMidterm presentation
Midterm presentationdsmo223
 
Comparing web frameworks
Comparing web frameworksComparing web frameworks
Comparing web frameworksAditya Sengupta
 
Zend Framework Handout
Zend Framework HandoutZend Framework Handout
Zend Framework Handoutlucianb
 
Zend Framework Handout
Zend Framework HandoutZend Framework Handout
Zend Framework Handoutlucianb
 

What's hot (7)

Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
Roman Chernov.Panels custom layouts.DrupalCampKyiv 2011
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Midterm presentation
Midterm presentationMidterm presentation
Midterm presentation
 
Comparing web frameworks
Comparing web frameworksComparing web frameworks
Comparing web frameworks
 
SQLite - Overview
SQLite - OverviewSQLite - Overview
SQLite - Overview
 
Zend Framework Handout
Zend Framework HandoutZend Framework Handout
Zend Framework Handout
 
Zend Framework Handout
Zend Framework HandoutZend Framework Handout
Zend Framework Handout
 

Similar to Intro to Drupal Module Developement

Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Anil Sagar
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 moduletedbow
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.DrupalCamp Kyiv
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒StephaneBoghossian1
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDavid Lanier
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectIztok Smolic
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionalityRaymond Muilwijk
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Gerke Max Preussner
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with DrupalRob Sawyer
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)Paul Jones
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueAlexandre Israël
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for DevelopersIan Carnaghan
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules uploadRyan Cuprak
 
Get Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsGet Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsMelissa Piper
 

Similar to Intro to Drupal Module Developement (20)

Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionality
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4
 
Module development
Module developmentModule development
Module development
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
 
D8 training
D8 trainingD8 training
D8 training
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices Catalogue
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
Get Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsGet Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal Distributions
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Intro to Drupal Module Developement

  • 1. Drupal 7 Module Development A Brief Introduction Matt Mendonca
  • 2. Background • IT Specialist at the National Institute of Standards and Technology • 2+ years professional experience with Drupal • Previously worked for VOX Global (FleishmanHillard) and High Rock Studios
  • 3. Content • What are modules • Why you should modularize your code • What makes up a module • What is the hook system • How does that (magic) work • Resources • Make a module
  • 4. Modules Are… • Building blocks • Encapsulated functionality • Frameworks • API’s
  • 5. Why You Should Modularize Your Code • Code encapsulation • Enable / disable code • Cleanly extend core and / or contributed modules • Prevents hacking other's code • Preserves upgrade path • https://www.drupal.org/best-practices/do-not-hack-core • Share your code • Allows your code to be extendable
  • 6. Modules And Themes • Make things work using modules • Make things pretty using themes • Developing modules allows you to keep logic out of your themes • Separation of concerns
  • 7. Module Dissected • Folder designated by the machine name of the module (/sites/all/modules/dev/my_module)* • Info file designated by the machine name of the module (my_module.info) • Module file designated by the machine name of the module (my_module.module) * Drupal’s module scanning is recursive; you can add folders with in the module folder and it will find it. E.g. /sites/all/module/contrib | /sites/all/module/dev | etc.
  • 8. Info File • The .info file describes your module • At the minimum describe name, description, package, and core
  • 9. Info File: Name • Name is the user friendly name of your module • E.g. name = “My Module”
  • 10. Info File: Description • Description is the description of your module • E.g. description = “This my module.”
  • 11. Info File: Package • Package is the category of your module • Groups modules together on the module admin page • E.g. package = “User Interface”
  • 12. Info File: Core • Core is the major version of Drupal core that your module is designed for • E.g. core = 7.x
  • 13. Info File: Version • Version describes which release your module is at • By convention, version of Core followed by version of the module • Note: this is only to be filled out when your module is not on Drupal.org • E.g. version = 7.x-1.0
  • 14. Info File: Dependencies • Dependencies is an array listing all the modules that your module requires • You do not need to list the dependencies of your dependencies • E.g. dependencies[] = views dependencies[] = panels
  • 15. Info File: Configure • Configure specifies the url of the module’s configuration page (if any) • Adds a configure link on the module admin page • E.g. configure = admin/config/content/my-module
  • 16. Module File • The module file is the file that Drupal always loads for enabled modules - always • Should contain your bootstrap code / hooks • When possible, store code in .inc files
  • 17. (Captain) Hook • The hooks system provides access points to Drupal's response cycle • Used by Modules and Themes (preprocessing) • Like a roll call
  • 18. How Does The Hook System Work • At certain points in Drupal's response cycle, Drupal (and module's with hooks) will run hook- able functions • Lets explore: https://github.com/matt- mendonca/hooks-explained
  • 19. Modules That Don't Have Any Hooks • There are modules that don't use any hooks • Use Case: loading a php library for use by other modules
  • 20. Resources • https://www.drupal.org/developing/modules • https://www.drupal.org/best-practices • https://api.drupal.org/api/drupal • https://drupal.stackexchange.com/ • https://stackoverflow.com/questions/tagged/drupal • https://www.google.com/
  • 22. Lets Make A Module ! https://github.com/matt-mendonca/example-d7-module