Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Drupal 8 Development Beginner's Guide Second Edition
Table of Contents
Drupal 8 Development Beginner's Guide Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Setting Up a Drupal Development Environment
Installing Drupal for local development
Time for action – installing Drupal using Acquia Dev Desktop
What just happened?
Installing Drupal the localhost way
Time for action – installing a Mac OS X AMP stack
What just happened?
Time for action – installing a Windows AMP Stack
What just happened?
PHP configuration
Time for action – modifying the php.ini settings
What just happened?
Modifying the MySQL my.cnf settings
Time for action – setting up MySQL for Drupal
What just happened?
Time for action – creating an empty MySQL database
What just happened?
Installing Git
Time for action – installing Git for Mac OS X
Time for action – installing Git for Windows
What just happened?
Installing Drush
Time for action – installing Drush for Mac OS X
Time for action – installing Drush for Windows
Installing Drupal 8
Time for action – installing Drupal 8
What just happened?
Installing the PHPStorm IDE
Time for action – installing the PHPStorm IDE
Time for action – creating a new PHPStorm project
Drupalize PHPStorm IDE
Drupal from a developer's perspective
Installing Vagrant
Time for action – installing Vagrant
What just happened?
Summary
2. Custom Module Development
Creating custom Recipe content type
Time for action – creating custom content type
What just happened?
Time for action – adding a new recipe
What just happened?
OOP concepts in Drupal
Time for action – developing a custom module in Drupal 8
What just happened?
Time for action – developing custom field formatter
What just happened?
Test-driven development (TDD)
PHPUnit tests for Drupal classes
Functional tests
Time for action – writing and testing functional test from our d8dev custom module
What just happened?
Summary
3. Drupal Views and Configuration Management
A quick introduction to Views
Time for action – creating a recipe listing block using views
What just happened?
Configuration management in Drupal 8
Using the Configuration Management interface
Time for action – importing, exporting, and synchronizing configurations
What just happened?
Working of Configuration Management in Drupal 8
Changing the active configuration storage
Introducing the Devel module
Installing the Devel module
Time for action – generating dummy content using the devel_generate module
What just happened?
Summary
4. Introduction to the Field Types API and Developing the Custom Field Module
Introducing the NutritionInformation module
Time for action – developing a custom module for a compound NutritionInformation field
What just happened?
Time for action – updating the Recipe content type to use the NutritionInformation field
What just happened?
Summary
5. Theming in Drupal 8
What is a theme?
Time for action – creating a sub-theme
What just happened?
An overview of Bartik
Mobile first, responsive themes
Time for action – installing Drush
Time for action – Adding assets to your theme
What just happened?
Time for action – calling assets on specific pages
What just happened?
Introduction to templating and Twig
Theme hook suggestions
File and function names
Brackets syntax
Rendering
Filters
Control structures
Debugging Twig
HTML comments in markup
Debugging variables
Kint
Time for action – Twig in practice
What just happened?
Time for action – understanding the benefits of contributed modules
What just happened?
What are contributed modules?
How do I know whether a module is safe to use?
Is it better to use a contrib module or custom code?
Summary
6. Enhancing the Content Author's User Experience
A quick introduction to CKEditor in Drupal 8
Configuring CKEditor profiles
Time for action - adding some buttons to the basic HTML profile
What just happened?
Time for action - exporting CKEditor configuration
What just happened?
Adding a new CKEditor profile
Time for action - creating a text-only control profile for anonymous users
What just happened?
Classic editor and inline editing
Time for action – using inline editing
Adding widgets to CKEditor
Have a go hero - create a CKEditor plugin and allow Drupal to discover it
Introduction to the Block API for Drupal 8
Time for action – creating a block to aid the authoring experience
What just happened?
Time for action – including default configuration in your module
Summary
7. Adding Media to Our Site
Introduction to the File entity module
Working with dev versions of modules
Time for action – installing a dev version of the File entity module
What just happened?
A new recipe for our site
Time for action – adding a Recipe images field to our Recipe content type
What just happened?
Creating a custom image style
Time for action – adding a custom image style through the image style administrative page
What just happened?
Time for action – creating a programmatic custom image style
What just happened?
Integrating the Colorbox and File entity modules
Time for action – installing the Colorbox module
What just happened?
Working with Drupal issue queues
Time for action – creating an issue for the Colorbox module
What just happened?
Summary
8. How Does It Taste? – Getting Feedback
Introduction to the Drupal contact form
Time for action – enabling and configuring the core contact form
What just happened?
Adding placeholder text to our contact form
Using configurations to add placeholder text to the contact form
Time for action – adding placeholder text to our site contact form
What just happened?
Using custom code to add placeholder text to the Name and Email fields
Time for action – adding placeholder text to Name and Email fields
What just happened?
Time for another recipe!
Colorbox file enhancements
Time for action – enhancing the Colorbox module with image title and alt captions
What just happened?
Contributing our code to Drupal
Time for action – creating a patch and uploading it on the Drupal issues queue
What just happened?
Recipe reviews with comments
Time for action – configuring comments as recipe reviews
What just happened?
Time for action – enhancing the liking system using comments and views
What just happened?
Summary
9. Advanced Views Development
Views revisited – advanced configuration
Random top rated recipe block
Time for action – building a random top rated recipe block with Views
What just happened?
Taxonomy-based View with tabs
Time for action – creating a cuisine vocabulary to organize recipes
What just happened?
Time for action – creating a Recipes by cuisine type Views block
What just happened?
Time for action – installing and using the Views Field View module for our Recipe by Cuisine Type View
What just happened?
Tabbed Views display
Time for action – developing a Views style plugin for semantic tabs
What just happened?
Time for another Recipe
Contributing the Views semantic tabs module to Drupal
Time for action – creating a sandbox for the views semantic tabs module
Summary
10. Drupal Project Management and Collaboration
Rotating banners with the Views Slideshow module
Time for action – installing the Views Slideshow module
What just happened?
Creating a rotating banner with Views Slideshow
Time for action – creating a banner using the Views Slideshow module
What just happened?
Time for action – creating a new image style for images in our rotating recipe banner
What just happened?
Enhancing the appearance of our front banner with a pager and CSS
Time for action – updating the front banner view to include a slide show pager
What just happened?
Time for another recipe
Promoting a sandbox project to a full project
Time for action – creating README.txt and pushing to the sandbox
What just happened?
Time for action – promoting the Views semantic module to a full project on Drupal.org
What just happened?
Introducing the Features module
Time for action – installing the Features module
What just happened?
Recipe feature by the Features module
Time for action – using the Features module to export the Recipe content type and related configurations
What just happened?
When to use core Configuration Management compared to Features
Summary
11. Searching Your Site with the Search API Module
The Drupal core search
The Search API module
Time for action – basic installation and configuration of the Search API module
What just happened?
An explanation of search servers and search indexes
Search server
Search index
Fields
Processors
Populating your search index
Exposing the search to users
Altering the search display
Excluding entities from being indexed
Installing Apache Solr as the search backend
Installing Solr 4.x on a virtual machine with Vagrant and Puppet
Time for action – creating and configuring your virtual machine
What just happened?
Installing Solr 5.x manually on Ubuntu 14.04
Time for action – installing and configuring Solr on Ubuntu
What just happened?
Securing Apache Solr with Uncomplicated Firewall
Time for action – configuring Uncomplicated Firewall
What just happened?
The Search API Solr module
Time for action – configuring Drupal to use Apache Solr
What just happened?
Using the read-only mode
Search facets
Time for action – building faceted search blocks
What just happened?
Have a go hero
Pop quiz
Summary
12. RESTful Web Services in Drupal
Introduction to web services
Introduction to REST
Headless Drupal
When to decouple Drupal or when to use Headless Drupal
RESTful web services in Drupal
RESTful APIs in Drupal
Time for action – getting all the recipe types
What just happened?
Time for action – creating an API to get all the recipes under a recipe type
What just happened?
Time for action – consuming RESTful web services using AngularJS
What just happened?
Summary
A. Pop Quiz Answers
Chapter 11 – Searching Your Site with the Search API Module
Pop quiz
Index
← Prev
Back
Next →
← Prev
Back
Next →