3 namespace Drupal\typogrify\EventSubscriber;
5 use Symfony\Component\HttpKernel\KernelEvents;
6 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
9 * Class \Drupal\typogrify\EventSubscriber\InitSubscriber.
11 class InitSubscriber implements EventSubscriberInterface {
16 public static function getSubscribedEvents() {
17 return [KernelEvents::REQUEST => ['onEvent', 0]];
20 public function onEvent() {
22 // The Assets API has totally changed. CSS, JavaScript, and libraries are now
23 // attached directly to render arrays using the #attached property.
26 // @see https://www.drupal.org/node/2169605
27 // @see https://www.drupal.org/node/2408597
28 // drupal_add_css(drupal_get_path('module', 'typogrify') . '/typogrify.css');