Services
TopicServices are objects that encapsulate the code for performing specific tasks in a reusable and decoupled way.
Twig is a template engine for PHP, which is the language used in Drupal. Twig can be used to design templates in generic PHP applications as well as Drupal themes.
Drupal Composer Project
TopicThe Drupal Composer Project provides a scaffold for starting a new Drupal project and managing that project's dependencies with Composer. It was created before the drupal/recommended-project Composer project template was developed, which is the current best practice method for creating a new Drupal site with Composer.
HTML and CSS
TopicHTML and CSS are the foundational languages for how browsers display web pages.
JavaScript
TopicJavaScript (JS) is an interpreted programming language that is widely used on the web to control web page behavior and interactivity.
Symfony
TopicSymfony is a set of reusable PHP components, and a framework for building PHP applications. Drupal makes use of various Symfony components.
YAML
TopicYAML, which stands for YAML Ain't Markup Language, is a human-readable data serialization format that's been widely adopted in a variety of use cases in Drupal.
Performance and scalability determine how fast your application can serve a page and to how many users at a time.
Events
TopicEvents are one of the ways that module developers can alter or extend Drupal without modifying existing code.
Xdebug
TopicDebugging your Drupal codebase can be made substantially easier by learning how to enable and configure the Xdebug PHP extension.
Caching in Drupal
TopicCaching in Drupal is controlled by Drupal's Cache API which is used to store any type of data on a permanent or temporary basis. Some types of data tend to take a long time to compute, but utilizing the Cache API in your module can help your site load data more quickly.
Learn about resources to guide you through the process of updating a module or theme to the latest version of Drupal.
In Drupal’s core library there are a number of utility functions and classes that, as a module developer, you will find make your task easier or less tedious.
Plugins (Plugin API)
TopicPlugins are one of the ways that module developers can write code that extends Drupal. The Drupal Plugin API allows a module to provide functionality in an extensible, object-oriented way.
Upgrading is the process of moving your site from a previous major version of Drupal to a newer version, for example from Drupal 7 to Drupal 8 or Drupal 9 to Drupal 10.
The Migrate API can be used to import content from an older Drupal site (Drupal 7 or older), or any other data source, into the current version of Drupal.
The Render API consists of a standard format for describing data using structured arrays and a process for converting those arrays into the HTML a user sees when interacting with a Drupal site.
Drupal Core Modules
TopicA module is a set of PHP, JavaScript, and/or CSS files that extends site features and adds functionality. The Drupal core software comes with a set of modules that provide a range of features.
Let's Write Some PHP
FreeSo you want to become a PHP developer. And not just any ole' programmer, but someone who writes great code and can work on exciting projects. Well then, this series from our partners at KnpUniversity is for you! You'll learn how to develop with PHP from the very beginning, with a real project, and coding exercises throughout the lessons so you can practice immediately.
In this series, we'll learn PHP from scratch by building a real website. This means you'll learn the practices used by developers to build really cool things, and not just a bunch of theory. We're going to build a site that we're calling AirPupnMeow.com. Imagine a site like Airbnb.com, except where people rent cute pets instead of apartments. If you're looking for companionship without all that responsibility of walking your dog every morning and bringing a bag to pick up his... uh gifts, then this site would be for you! Ok, the idea might be kinda silly, but that hasn't stopped startups in the past!
In this first lesson we are going to dive right in and create our first PHP file, play around with variables, and also look at what happens when we make an error, and how to read the error message we get. If you want to follow along with the steps here, you will need access to a web sever where you can write PHP files. You can get set up quickly with a number of local development servers. We have lessons that cover material for different operating systems in our Development Environments topic page.
Throughout this first series of PHP for Beginners, you are going to learn to:
- Use functions, and variables
- Work with arrays, loops, and if statements
- Read and update files
- Handle JSON
- Set up your computer to run PHP
- Create your own functions
- Organize your project into multiple files
- Create a simple layout
Additional resources
We already know what to write when we want to use some PHP code, how to set a variable, and how to print things. Like most languages, PHP also has functions that make it easier to do more complex tasks. Instead of you needing to figure out all of the logic to accomplish something, like randomizing a number, you can just use an existing PHP function, like rand(), to do the work for you. In this lesson, you'll learn how to use a function, what arguments are and how they work, and use some examples in our demo site code.