This PHP tutorial covers the basics of classes and objects. You'll learn how to set up a class and then what a class is and what objects are like. By the end of this tutorial you should be able to create a class, an object, create a property, and set the value of a property inside a class.
Additional resources
In this PHP tutorial, you'll learn about methods — functions that live inside objects. You'll also learn how to access properties inside methods using the $this
pseudo-variable.
Additional resources
In this PHP tutorial, you'll get more practice working with methods. Along with adding some functionality to a method using PHP's sprintf()
function to format a string, you'll use the $this
pseudo-variable, and learn how to add and use arguments with methods.
Additional resources
The Drupal 8 development cycle has definitely been a long one. There are several exciting features on the way, but the improvements to the authoring experience in Drupal 8 have definitely drawn a lot of attention. (I know Amber is clamoring for in-place editing for this blog.) The Spark project is the home to much of this work. Several new core modules that contribute to these improvements (Contextual, Quickedit, Toolbar, CKEditor and to a lesser extent, Tour) leverage a pair of popular javascript libraries Backbone.js and Underscore.js.
Both Backbone.js, and its dependency Underscore.js were committed to Drupal 8 two years ago! Let's take a quick look at both Backbone.js and Underscore.js, how they're used in core, and how you might be able to use them to simplify some javascript for your site.
The Drupalize.Me podcast (formerly the Lullabot podcast) has been running for many years now. During this time, not much has changed as far as what makes the podcast itself. There is theme music, a host, guests, event updates, and now even sound effects. Even when it comes to how we record a podcast, not much is different in either the method or the technology. What can make or break a podcast, though, is the quality of the sound. I'm not talking about if the podcast is HD or anything, but what the overall quality of a person's voice is, the ability to reduce or eliminate background distractions, or even just being able to create a good mix of volumes. All these things are great to be able to have some control over and edit before putting the podcast out to the masses.
Drupalize.Me Update: March 2015
Blog postAs Drupal 8 approaches, our team has been growing and really pushing ourselves. Over the past few weeks, we released some impressive tutorials and site updates. Here's an overview.
This video was part of a series of presentations produced in anticipation of Drupal 8's official release. For information about Drupal 8 module development based on official releases of Drupal 8, view tutorials in our Drupal 8 Module Development series.
[# card #]
nid: 2766
title: Drupal 8 Module Development Guide
[# endcard #]
One of the things that makes Drupal an attractive platform for developers to build their applications with is its extensibility. If you've ever used a contributed module, or written your own, you've taken advantage of this fact. Almost everything about the way that Drupal core works can be altered, extended or even replaced in order to allow developers total control. Historically that's always been done by implementing hooks. In Drupal 8 however, we've got some new tools to allow module developers to extend, alter, and enhance core's functionality.
In this presentation we'll take a high-level look at these new options, including:
- The role of hooks in Drupal 8
- The new plugin system for adding functionality
- Using routes to map HTTP requests to custom code
- Events and event listeners
- The service container and adding new services
- Using the Entity API for data storage
After watching this presentation you should have basic knowledge of the various ways in which Drupal 8 can be extended, and when to use each one. You'll also get information about what you can do now to start preparing for using these new tools.
Additional resources
API Documentation on api.drupal.org:
Articles and Video Tutorials:
- Module Development Essentials (KnpUniversity on Drupalize.Me)
- Dependency Injection and the Art of Services and Containers video tutorials
- Responding to Events in Drupal 8 article
- Unravelling the Drupal 8 Plugin System article
- An Introduction to YAML (Drupalize.Me)
DrupalCon:
- Altering, Extending, and Enhancing Drupal 8 — Joe Shindelar (eojthebrave) (DrupalCon New Orleans, May 2016)
Drupal's Change log:
This video was part of a series of presentations produced in anticipation of Drupal 8's official release. For information about multilingual sites based on official releases of Drupal 8, take a look at our Multilingual sites topic.
[# card #]
nid: 2925
title: Multilingual sites topic
[# endcard #]
This presentation outlines some of the major changes to the Drupal core multilingual system. A lot of features that were in contributed modules have been rolled into core, and a number of existing multilingual features have been greatly improved. There are a lot of cool new things to get up to speed with. In this video, we'll review:
- New and obsolete modules
- UI changes
- Developer changes
After watching this presentation you should have a better understanding of the things you'll need to learn to get up to speed with the new multilingual features in Drupal 8, including things to watch for on the module development and theming sides.
Additional resources
Drupal 8 Multilingual Initiative site
Gábor Hojtsy's Multilingual Changes Summary (PDF)
This week we continue to explore what's new in Drupal 8. We began this series with the Theming, CMI, and OO-PHP editions of our What's New in Drupal 8 series. Last week, we covered what's new in the Entity API, Blocks, Content Authoring Experience, and Mobile and Responsive Features. This week, we have videos outlining what's new in extending Drupal 8 (where did all the hooks go?), new site building features and workflows, and multilingual features. Finally, as a bonus, we have a free video tour of localize.drupal.org, where you can see how Drupal gets translated into languages from all over the world.
This presentation walks through quite a long list of major contributed modules and best practices that have been incorporated into Drupal 8 core. There are a lot of new features that you'll get out of the box, from Views to Services. In particular we'll cover:
- Exactly what best practices mean
- How core and contributed modules help the community define best practices
- List the major categories of features that have been incorporated
After watching this presentation you should have a better understanding of what best practices are, and a list of the major contributed modules from Drupal 7 that have been added, in one form or another, into Drupal 8.
Do you want to know how to contribute translations to Drupal core or other contributed modules and themes? Have you ever wondered how translations are managed in Drupal? It all happens in the community at localize.drupal.org. This tutorial gives a tour of localize.drupal.org and then teaches you how to join translation groups and contribute translated strings back to the Drupal community.
Additional resources
Drupalize.Me and Lullabot together have made a donation of $5,000 to the Drupal 8 Accelerate Fund, becoming an anchor donor of this critical funding initiative. We heartily believe in funding core development and are so excited to be a part of providing a much needed final push to a Drupal 8 stable release. Learn more about how you can be a part of accelerating the release of Drupal 8.
Drupalize.Me Podcast No. 60
Blog postA new podcast, Drupalize.Me 2015 Spring Update, is ready for a listen. The Drupalize.Me team typically gets together each quarter to go over the past goals and create new ones.
This week we continue our series of presentations on What's New in Drupal 8. We'll explore blocks, the entity API, the all new content authoring experience, and mobile and responsive features in Drupal core.
This video was part of a series of presentations produced in anticipation of Drupal 8's official release. To learn about Drupal 8's new Entity API, take a look at our Entity API series.
[# card #]
nid: 2792
title: Entity API series
[# endcard #]
In this presentation we're going to take a high-level look at the new Drupal 8 Entity Field API. This is an improved version of the Entity API and Field API that was started in Drupal 7. Entities are the new recommended way of dealing with data in Drupal and as such, familiarizing yourself with the workings of the Entity API will be important when it comes time to store or retrieve data from your custom modules. It's a big change from what we're used to in Drupal—directly accessing the database via the database abstraction layer—but the Entity Field API also has some distinct advantages.
This presentation covers:
- Improvements to the Entity API
- Improvements to the Field API
- Handlers, Controllers, and ways to manipulate entities
- Discussion of new types of things we can build with these changes
- What you can do to start learning now
After watching this presentation you should be able to articulate the improvements made to the Entity Field API in Drupal 8 and start to understand how you might make use of it in your own code. We'll also cover some of the things you can start doing now in order to prepare yourself to use the Entity Field API in Drupal 8.
Additional resources
- Community documentation for Entities (drupal.org)
- Entity API (api.drupal.org)
- Drupal 8 Entity API DrupalCon Austin presentation (austin2014.drupal.org)
- Topic: Entities (Drupalize.Me)
Blocks have always been a part of Drupal and have always been a very limiting way of putting content on your site. Just to make it a usable system, contributed modules were almost always required. Drupal 8 has come a long way and has added much needed functionality to the core block system.
In this presentation we will cover what is new when it comes to the block system in Drupal 8 and the advantages that it offers.
What is different?
- Custom blocks, and blocks in general, can be used more than once
- A block title is now an on/off check box instead of having to use <none>
- A block can be placed in more than one region
- You can create "block types" much like content types
- The UI is easier to use with new blocks now in a sidebar instead of at the bottom
- This sidebar UI allows for dynamic filtering to make it even easier to find a block
- Configurations of block types and layout are now in code
- Blocks are plugins
To learn more about blocks, refer to our Blocks topic page.
[# card #]
nid: 2936
title: Blocks topic
[# endcard #]
Additional resources
Drupal 8 has done quite a few things to make things much easier for site builders to empower content creators. There are more tools in core that tremendously help content creators to quickly add and edit content. These tools are also mobile-friendly which makes content editing possible across more devices.
New features in core for content editors:
- Text formats and editor configuration
- CKEditor
- Drag and drop editor toolbar configuration
- Image captions
- Quick edit
- Better preview with view mode options
- Responsive and mobile-friendly interface
How do these changes help? To start; currently you need to add modules and outside editors just to get an editor in Drupal. The configuration of that editor is very cumbersome with lots of checkboxes and a very unfriendly UI. Besides a better user experience when it comes to configuring the authoring experience, adding and editing content on the go via mobile devices is a must have for today's modern CMS.
Additional resources
This video was part of a series of presentations produced in anticipation of Drupal 8's official release. For information about responsive design tools based on official releases of Drupal 8, view tutorials in our Responsive Web Design topic.
[# card #]
nid: 2968
title: Responsive Web Design topic
[# endcard #]
Drupal 8 is now a friend of mobile—mobile users, mobile developers, and even mobile site administrators. In this presentation, we'll look at the variety of mobile-friendly features added to Drupal 8 in the areas of site administration, site building, and module development.
"Mobile" means different things to different folks. For a content editor, being able to quickly update a piece of content from any device means one less barrier to getting a task done, when and where they want. For a developer, the prospect of diving into web services and building APIs that can be used for mobile apps or in conjunction with the latest Javascript framework is empowering and exciting, especially since the work of structuring entities and fields and administrating content can stay in Drupal. For the site builder, who simply wants to quickly get a site up and running out-of-the-box with a theme that "just works on mobile," the default responsive theme, Bartik, is a time-saver for sure.
By the end of this lesson, you'll have a better idea of the depth and breadth of what "mobile" means for Drupal 8 users of all kinds.
Additional resources
Tutorial: Vagrant Drupal 8 Development
Blog postVagrant Drupal Development (VDD) is a ready-to-use development environment using a virtual machine. Why use it? It provides a standard hosting setup, contained in a virtual machine, for developing with Drupal. This allows you to get up and running really, really quickly, without knowing anything about server administration.