O'Reilly logo

Drupal 8 for Absolute Beginners by James Barnett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 10

image

Adding PHP-Generated Output to Your Drupal Module

Now you can plug your knowledge of PHP into your basic Drupal module. The hello_world.module file itself in your module, of course, uses PHP as the essential piece of the module, the Controller, the class, and more. But also in this chapter you’ll see how to use PHP to help construct the output on the screen for the user. Knowing PHP well will allow you to add dynamic content to your module, which would require variables, if statements, and other complex logic. PHP is used as the nuts and bolts of Drupal itself and all its modules, and it will be a staple for all of your custom module ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required