GithubHelp home page GithubHelp logo

plug's Introduction

Build Status Scrutinizer Code Quality Join the chat at https://gitter.im/Plug-Drupal/plug

Plug

Get the plugin system for Drupal 8 in your Drupal 7 developments.

The Plug module is a module for developers that can't wait until Drupal 8 comes out to use the plugin system that will ship with it. You can use this as an alternative to your custom CTools plugins.

Do I need this module?

This is one of those modules that does nothing by itself, but provides tools for developers for a better developer experience. If you write custom PHP code for Drupal in a day to day basis, you can probably take advantage of this module and start writing plugins.

In Drupal 8 everything is a plugin, by starting to write Drupal 8 style plugins today you accomplish two main objectives:

  • Your code is more capable to cope with change, is more maintainable and flexible.
  • You are already learning how you will program for Drupal 8 when it comes out.

Examples

Here you have a couple of examples. The best thing that you can do is read this amazing post about plugins.

Architecture

This module relies on some parts of the Drupal 8 code. Those parts have been encapsulated inside this module to simplify the installation process.

Implementation examples

There is an example module shipped with this module that will show you how to create your plugins and use them.

Things that can be plugins.

Beep-boop-clink-clank, this section is not done just yet. Check back soon!

Situations in which plugins are useful? Anytime you need to allow modules to provide additional "things" that implement the same interface but provide distinctly different functionality. Blocks are the classic example. In Drupal every block consists of essentially the same parts, a label, some content, and various settings related to visibility and cachability. How that label and content is generated is likely very different from one module to the next though. A custom block with static content vs. one provided by Views for example.

Installing

Installation is straightforward. You only need to download and enable the module.

Implementations

The following modules use the Plug module to declare their plugins. If you want your module to be in this list, open an issue.

plug's People

Contributors

e0ipso avatar plopesc avatar emisaacson avatar gitter-badger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.