Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/home/poplarware/public_html/poplarware.com/vendor/symfony/http-foundation/ResponseHeaderBag.php on line 336

Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/home/poplarware/public_html/poplarware.com/vendor/symfony/http-foundation/ResponseHeaderBag.php on line 336
Services and Containers in Drupal 8 | Poplar ProductivityWare

Services and Containers in Drupal 8

Author: Jennifer Hodgdon
Date Written: 20 October, 2014
Type: Presentation
Subject: Drupal

On October 18, 2014, I gave at talk at the Pacific Northwest Drupal Summit entitled "Services, Dependency Injection, and Containers, oh my!". Description:

Drupal 8 introduces the concepts of Services, Dependency Injection, and the Container to Drupal. They my seem a bit mysterious to programmers who are used to working with Drupal 7 or earlier versions. To help clear up the mysteries, this session will answer these questions:

  • What is a service?
  • What are those $container variables all over the code?
  • What are dependencies, and what is injection?
  • What's the easiest way to interact with services, and ... since you're about to tell me how wrong it is to do it that way, how should I really be doing it in my code?
  • How can I override a service?
  • Why is this all important (why did Drupal adopt this conceptual framework in the first place)?

Slides are attached below.