Introduction to Object-Oriented Programming
summary
Crash course that makes someone Drupal 8–ready by showing actual code patterns: class-based form elements with a shared abstract base and overridden render methods, building an Ajax autocomplete by adding JS and calling parent::render, a Views field handler that formats timestamps with php date and a custom sort handler that emits a 0/1 SQL expression, Drupal 7 autoload via .info files versus Drupal 8 PSR-4 autoloading, how to get services via the service container and ControllerBase, and using PHPUnit mocks and Drupal simple tests.
AI-written summary · about
chapters (24)
- 0:00Introduction to OOP
- 1:12About the speaker
- 2:35Session objectives
- 3:19Programming styles history
- 8:14PHP OOP fundamentals
- 12:13Form elements and classes
- 14:40Inheritance in OOP
- 17:17Method overriding
- 20:06Namespaces and traits
- 22:38Class properties and methods
- 24:03Interfaces and inheritance
- 24:46Dependency injection
- 26:35Service container
- 27:59OOP in Drupal 7
- 31:18Queueing mechanism
- 32:44Entity controllers
- 33:25Mail system
- 34:07Module and theme updaters
- 34:28Views OOP implementation
- 38:01OOP in Drupal 8
- 39:06Plugins in Drupal 8
- 41:13Controllers in Drupal 8
- 42:41Testing in Drupal 8
- 44:30Why Drupal uses OOP
