Viewing posts tagged PHP

Just Released: Docker, Symfony 4, Composer, and Form API Tutorials

This week, we've published more tutorials for our Drupal Development with Docker series, a new video series from KnpUniversity that will get you up and running with Symfony 4, a brand new set of tutorials: Introduction to Composer for Drupal Users, and another Form API tutorial.

Release Day: Symfony 3 Video Tutorials

Drupalize.Me is excited to present this series of screencasts to get you up and running with Symfony 3 with these video tutorials from our friends at KnpUniversity.

Drupal 8 Prep: Inheritance, Abstraction, and Interfaces in PHP

In this series, Object-Oriented PHP Part 3, we'll teach you all about inheritance in PHP, including how that works in classes, abstractions, and interfaces. These concepts are keys to understanding the code you will see in Drupal 8 modules.

Drupalize.Me Is Going to ZendCon

We'll be attending ZendCon 2015 this week, learning about what the PHP community is up to, and sharing our Drupal knowledge.

Dynamically Access PHP Object Properties with $this

Sometimes we need to be able to retrieve the value of a property on an object, but we don't know the name of that property. Instead, we need to dynamically calculate the property name, and then access the value. For example: $row->{$my_property};. This post looks at how the Views module uses this technique and allows for a huge amount of flexibility.

Release Day: Object-Oriented PHP Part 2

We've recently switched from weekly releases to working towards releasing an entire series all on the same day. The Object-Oriented PHP Part 2 series is the first one we're doing with this. You get access to the complete series today! This second part of three on object-oriented PHP, provided by KnpUniversity, continues on from our Introduction to Object-Oriented PHP series.

PHP Classes and Objects

Object-oriented programming (OOP) is way of organizing your code to be more efficient, and it takes advantage of some really nice features in modern versions of PHP. One of the basic concepts of OOP is, not surprisingly, an object. Directly related to working with objects is understanding PHP classes. Drupal 8 is taking big steps to move to an OOP architecture, and so you will get very familiar with both of these as you start to jump into Drupal 8 development.

This tutorial, based on the video Create a Basic PHP Class, will explain what a class is, show you how to set up a class, and look at a PHP object. By the end of this tutorial, you will be able to create a class, an object, add a property to your object, and set the value of the property inside the class.

Release Day: Access Control, Type Hinting, and Constructors in PHP

This week, we're wrapping up our series, Introduction to Object-oriented PHP, in partnership with KnpUniversity, with tutorials on access control for properties, type hinting, and constructors in PHP.

Release Day: Working with PHP Objects

This week, we continue our Introduction to Object-oriented PHP series, in partnership with KnpUniversity, with tutorials that mostly focus on working with objects in PHP. You'll also learn how to add a specially formatted comment to your code that will enable code autocomplete functionality in your IDE.

Release Day: Introduction to Object-oriented PHP

In anticipation of the release of Drupal 8, one of the things we think is important is to provide foundational training material in areas related to the changes in Drupal 8. One major change is the shift to an object-oriented PHP (OO PHP) architecture, which you can learn more about here, in my presentation, What's New in Drupal 8: Object-oriented PHP. To provide a hands-on coding introduction to OO PHP, we worked with our partners at KnpUniversity to create a new series. Today we are delighted to release the first four video tutorials in the new KnpUniversity series, Introduction to Object-Oriented PHP.

Release Day: What's New in Drupal 8

We're really excited about Drupal 8, and this week we want to start sharing some of why we are. We're releasing a new group of video presentations that cover the major changes that are coming in Drupal, called What's New in Drupal 8. We also have a free video about the new semantic versioning system that will be used to determine Drupal 8's release numbers.

A Peek at Traits in Drupal 8

Part of learning Drupal’s API is learning about “what’s in the pantry.” In Drupal 8, that pantry is configured quite a bit differently than before. Instead of getting the whole warehouse of Drupal functions on every page load, functions—well, now methods—are contained in objects which are defined by classes. Most, if not all, of these classes, which exist in their own PHP files, can be extended and many of them are specifically designed to be extended. These extensible classes are the pantries. They contain properties and methods that we can just use in the classes that extend them. When we extend these classes, we need to make sure we peek inside to see what’s available before we go elsewhere for something that might already be in the cupboard.