SlideShare una empresa de Scribd logo
1 de 24
Future Proofing Your 
Drupal Skills 
Piyuesh Kumar 
QED42 
1
AGENDA: 
• Drupal 8 Api Changes: 
• Module info file 
• Routing System 
• Drupal 8 CMI & Using Config inspector 
• Writing forms and their submit handlers in d8. 
• Drupal 8 new plugin system 
• Basic changes to oftenly uses Drupal functions. 
2
Info File 
• Info files changed to info.yml 
• Old info file: {d7.info} 
• New info file: {d8.info.yml} 
3
Warning: 
Things are about to get... 
geeky. 
4
ROUTING SYSTEM 
• d7(hook_menu): 
5
D8 ROUTING 
SYSTEM(HOOK_MENU) 
• d8 conversion(hook_menu): 
• Hook_menu Lives until hook_default_menu_links() 
gets into core(https://drupal.org/node/2047633 
) 
6
D8 ROUTING 
SYSTEM(ROUTING.YML) 
• d8 conversion: 
• Callbacks and permissions are defined in a yml 
file.{d8.routing.yml} 
7
D8 ROUTING SYSTEM(WRITING 
CONTROLLERS) 
• d8 conversion: 
• Writing Page Callbacks 
8
D8 ROUTING SYSTEM(CORE 
CONTROLLERS) 
• _form 
• _content 
• _controller 
• _entity_form 
• _entity_list 
• and many more.. 
9
CONFIGURATION SCHEMA 
• R.I.P variable-get/variable_set 
10
CONFIGURATION SCHEMA 
• When would Config data get saved? 
• UI changes (automatic): When the save button 
is clicked on an admin page, data gets written to 
the active store as well as db. 
• Code changes (manual): use 
admin/config/development/sync to sync the 
config in code with db and active store. 
11
CMI(EXAMPLE) 
• D7: 
• D8: 
12
USING CONFIG INSPECTOR 
• https://drupal.org/project/config_inspector/git-instructions 
13
WRITING FORMS AND THEIR SUBMIT 
HANDLERS IN D8 
• FormInterface(https://api.drupal.org/api/drupal/c 
ore!lib!Drupal!Core!Form!FormInterface.php/interfa 
ce/FormInterface/8) 
• SystemConfigFormBase(http://drupalcontrib.org 
/api/drupal/drupal!core!modules!system!lib!Drupal!s 
ystem!SystemConfigFormBase.php/class/System 
ConfigFormBase/8) 
14
EXAMPLE 
• D7: 
15
EXAMPLE 
• D8: 
16
D8 FORMS(VALIDATION & 
SUBMISSION) 
• function validateForm(array &$form, array 
&$form_state) {} 
• function submitForm(array &$form, array 
&$form_state) {} 
17
D8 
FORMS(SYSTEM_SETTINGS_FORM 
??) 
• Extends SystemConfigFormBase: 
18
D8 FORMS(OTHER EXTENDABLE 
CLASSES IN CORE) 
• ConfirmFormBase(https://api.drupal.org/api/drupal/core!lib!Dru 
pal!Core!Form!ConfirmFormBase.php/class/ConfirmFormBase/ 
8) 
• BulkFormBase(https://api.drupal.org/api/drupal/core!modules!sy 
stem!lib!Drupal!system!Plugin!views!field!BulkFormBase.php/8) 
• FieldInstanceFormBase 
• ViewsFormBase(https://api.drupal.org/api/drupal/core!modules!vi 
ews_ui!lib!Drupal!views_ui!Form!Ajax!ViewsFormBase.php/class/ 
ViewsFormBase/8) 
19
WHAT HAPPENED TO DRUPAL_*_FORM 
FUNCTIONS? 
20
DRUPAL 8 NEW PLUGIN SYSTEM 
21
Module/hook system 
functions replaced with 
module handler 
service(https://drupal.org/n 
ode/1894902) 
22
Basic Function from d7 to d8 
• hook_init removed(https://drupal.org/node/2013014) 
• drupal_goto has been 
removed(https://drupal.org/node/2023537)e.g., 
drupal_goto($url)=>new RedirectResponse($url); 
• hook_boot has been removed(https://drupal.org/node/1909596) 
• $_GET[‘q'] has been 
removed(https://drupal.org/node/1659562) 
• drupal_*_form functions replaced with formBuilder service. e.g., 
drupal_get_from => Drupal::formBuilder()->getForm() 
• For more goto https://drupal.org/list-changes 
23
References 
Demo code is available at 
https://github.com/piyuesh23/Drupal8-demo 
• https://drupal.org/list-changes 
• http://previousnext.com.au/blog/controlling-access-drupal- 
8-routes-access-checks 
• https://drupal.org/node/1800686 
• DrupalCon Portland Videos 
(http://www.youtube.com/playlist?list=PLpeDXSh 
4nHjRlZKs7cj2L_kLI5osP5ERc) 
24

Más contenido relacionado

Destacado

Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarSuzanne Dergacheva
 
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...Mohammad Al-Ubaydli
 
operationalizing asthma analytic plan using omop cdm brandt
operationalizing asthma analytic plan using omop cdm brandtoperationalizing asthma analytic plan using omop cdm brandt
operationalizing asthma analytic plan using omop cdm brandtMarion Sills
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinSuzanne Dergacheva
 
Hl7 V3 Reference Models 20091123
Hl7 V3 Reference Models 20091123Hl7 V3 Reference Models 20091123
Hl7 V3 Reference Models 20091123Abdul-Malik Shakir
 

Destacado (8)

Paragraphs at drupal 8.
Paragraphs at drupal 8.Paragraphs at drupal 8.
Paragraphs at drupal 8.
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
 
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...
Using a Shared Electronic Patient Record to Develop and Assess e-Consultation...
 
operationalizing asthma analytic plan using omop cdm brandt
operationalizing asthma analytic plan using omop cdm brandtoperationalizing asthma analytic plan using omop cdm brandt
operationalizing asthma analytic plan using omop cdm brandt
 
Amia now! session two
Amia now! session twoAmia now! session two
Amia now! session two
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
HIE technical infrastructure
HIE technical infrastructureHIE technical infrastructure
HIE technical infrastructure
 
Hl7 V3 Reference Models 20091123
Hl7 V3 Reference Models 20091123Hl7 V3 Reference Models 20091123
Hl7 V3 Reference Models 20091123
 

Similar a Drupal 8 DX Changes

How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?DrupalGeeks
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationAmeex Technologies
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonLuca Lusso
 
Drupal 8 overview
Drupal 8 overviewDrupal 8 overview
Drupal 8 overviewikonamitech
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...Eric Sembrat
 
Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7Phase2
 
Drupal 8 update: May 2014. Migrate in core.
Drupal 8 update: May 2014. Migrate in core.Drupal 8 update: May 2014. Migrate in core.
Drupal 8 update: May 2014. Migrate in core.Vladimir Roudakov
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011camp_drupal_ua
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS DrupalMumbai
 
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...DataScienceConferenc1
 
Config management
Config managementConfig management
Config managementAlexei Goja
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Phase2
 
DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8DrupalDay
 
Hadoop course content Syed Academy
Hadoop course content Syed AcademyHadoop course content Syed Academy
Hadoop course content Syed AcademySyed Hadoop
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionSaravanaMuthu Jayaraj
 

Similar a Drupal 8 DX Changes (20)

How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
 
features+
features+features+
features+
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp London
 
Drupal 8 overview
Drupal 8 overviewDrupal 8 overview
Drupal 8 overview
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
 
Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7
 
Drupal online training - GoLogica
Drupal online training - GoLogicaDrupal online training - GoLogica
Drupal online training - GoLogica
 
Drupal 8 update: May 2014. Migrate in core.
Drupal 8 update: May 2014. Migrate in core.Drupal 8 update: May 2014. Migrate in core.
Drupal 8 update: May 2014. Migrate in core.
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
 
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
 
Config management
Config managementConfig management
Config management
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7
 
DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8
 
Hadoop course content Syed Academy
Hadoop course content Syed AcademyHadoop course content Syed Academy
Hadoop course content Syed Academy
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introduction
 

Último

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Último (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Drupal 8 DX Changes

  • 1. Future Proofing Your Drupal Skills Piyuesh Kumar QED42 1
  • 2. AGENDA: • Drupal 8 Api Changes: • Module info file • Routing System • Drupal 8 CMI & Using Config inspector • Writing forms and their submit handlers in d8. • Drupal 8 new plugin system • Basic changes to oftenly uses Drupal functions. 2
  • 3. Info File • Info files changed to info.yml • Old info file: {d7.info} • New info file: {d8.info.yml} 3
  • 4. Warning: Things are about to get... geeky. 4
  • 5. ROUTING SYSTEM • d7(hook_menu): 5
  • 6. D8 ROUTING SYSTEM(HOOK_MENU) • d8 conversion(hook_menu): • Hook_menu Lives until hook_default_menu_links() gets into core(https://drupal.org/node/2047633 ) 6
  • 7. D8 ROUTING SYSTEM(ROUTING.YML) • d8 conversion: • Callbacks and permissions are defined in a yml file.{d8.routing.yml} 7
  • 8. D8 ROUTING SYSTEM(WRITING CONTROLLERS) • d8 conversion: • Writing Page Callbacks 8
  • 9. D8 ROUTING SYSTEM(CORE CONTROLLERS) • _form • _content • _controller • _entity_form • _entity_list • and many more.. 9
  • 10. CONFIGURATION SCHEMA • R.I.P variable-get/variable_set 10
  • 11. CONFIGURATION SCHEMA • When would Config data get saved? • UI changes (automatic): When the save button is clicked on an admin page, data gets written to the active store as well as db. • Code changes (manual): use admin/config/development/sync to sync the config in code with db and active store. 11
  • 12. CMI(EXAMPLE) • D7: • D8: 12
  • 13. USING CONFIG INSPECTOR • https://drupal.org/project/config_inspector/git-instructions 13
  • 14. WRITING FORMS AND THEIR SUBMIT HANDLERS IN D8 • FormInterface(https://api.drupal.org/api/drupal/c ore!lib!Drupal!Core!Form!FormInterface.php/interfa ce/FormInterface/8) • SystemConfigFormBase(http://drupalcontrib.org /api/drupal/drupal!core!modules!system!lib!Drupal!s ystem!SystemConfigFormBase.php/class/System ConfigFormBase/8) 14
  • 17. D8 FORMS(VALIDATION & SUBMISSION) • function validateForm(array &$form, array &$form_state) {} • function submitForm(array &$form, array &$form_state) {} 17
  • 18. D8 FORMS(SYSTEM_SETTINGS_FORM ??) • Extends SystemConfigFormBase: 18
  • 19. D8 FORMS(OTHER EXTENDABLE CLASSES IN CORE) • ConfirmFormBase(https://api.drupal.org/api/drupal/core!lib!Dru pal!Core!Form!ConfirmFormBase.php/class/ConfirmFormBase/ 8) • BulkFormBase(https://api.drupal.org/api/drupal/core!modules!sy stem!lib!Drupal!system!Plugin!views!field!BulkFormBase.php/8) • FieldInstanceFormBase • ViewsFormBase(https://api.drupal.org/api/drupal/core!modules!vi ews_ui!lib!Drupal!views_ui!Form!Ajax!ViewsFormBase.php/class/ ViewsFormBase/8) 19
  • 20. WHAT HAPPENED TO DRUPAL_*_FORM FUNCTIONS? 20
  • 21. DRUPAL 8 NEW PLUGIN SYSTEM 21
  • 22. Module/hook system functions replaced with module handler service(https://drupal.org/n ode/1894902) 22
  • 23. Basic Function from d7 to d8 • hook_init removed(https://drupal.org/node/2013014) • drupal_goto has been removed(https://drupal.org/node/2023537)e.g., drupal_goto($url)=>new RedirectResponse($url); • hook_boot has been removed(https://drupal.org/node/1909596) • $_GET[‘q'] has been removed(https://drupal.org/node/1659562) • drupal_*_form functions replaced with formBuilder service. e.g., drupal_get_from => Drupal::formBuilder()->getForm() • For more goto https://drupal.org/list-changes 23
  • 24. References Demo code is available at https://github.com/piyuesh23/Drupal8-demo • https://drupal.org/list-changes • http://previousnext.com.au/blog/controlling-access-drupal- 8-routes-access-checks • https://drupal.org/node/1800686 • DrupalCon Portland Videos (http://www.youtube.com/playlist?list=PLpeDXSh 4nHjRlZKs7cj2L_kLI5osP5ERc) 24