Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Drupal 8 Plugin System

Drupal 8 Plugin System

Drupal 8 introduces a new, yet familiar sub-system for extending and managing Drupal's default behavior: it's The Plugin System. If you've ever developed for Views or CTools than these concepts will probably already be familiar to you. The plugin architecture provides you with a common interface that allows you to easily extend and swap out functionality without having to re-implement boiler-plate code, all while keep all your logic in one place instead of scattered around info hooks and procedural callbacks.

Video: http://youtu.be/2o5uY-iOoMo
Source Code: https://github.com/helior/pilot

Avatar for Helior Colorado

Helior Colorado

January 25, 2014

More Decks by Helior Colorado

Other Decks in Programming

Transcript

  1. Overview 1. Explain plugins 2. Why this matters 3. Critical

    Drupal 8 concepts 4. DEMO writing plugins 5. Internals of Plugin System 6. Create your own plugin-type
  2. What is a Plugin? A discreet class that executes an

    operation within the context of a given scope, as a means to extend Drupal’s functionality. Limited in scope Does one thing Configurable, reusable
  3. PSR-0: Autoloading Standard 1. Fully-qualified namespace should be in the

    format of 
 Vendor/Namespace/Classname 2. Directory structure must match namespace for plugin http://www.php-fig.org/psr/psr-0
  4. Service Containers Auto-instantiate service-oriented classes with all its registered dependencies.

    https://jtreminio.com/2012/10/an-introduction-to-pimple-and-service-containers
  5. Review 1. Explained plugins 2. Why that matters 3. Core

    concepts used in Drupal 8 Time for demos