Abstract
This chapter shows how you can have a Drupal module do more than one thing—in this case the hello_world module creates a custom page and you will now create a custom block. Rather than create a brand-new module to create the custom block, you’ll just add code to the existing module. This chapter also explores how to construct basic queries to pull information out of Drupal’s back-end datastore, which for most Drupal installations will be a MySQL database (although hooking up other database types to Drupal is possible).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 James Barnett
About this chapter
Cite this chapter
Barnett, J. (2015). Creating a Drupal Block Programmatically and Basic MySQL Usage. In: Drupal 8 for Absolute Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6467-5_11
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6467-5_11
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6466-8
Online ISBN: 978-1-4302-6467-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books