Skip to content

Commit

Permalink
Merge pull request #39 from Plug-Drupal/plopesc-readme
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
e0ipso committed Jul 11, 2015
2 parents 2ebb4db + 42a8634 commit 9579725
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ In Drupal 8 _everything_ is a plugin, by starting to write Drupal 8 style plugin
## Examples
Here you have a couple of examples. The best thing that you can do is read this [amazing post about plugins](https://drupalize.me/blog/201407/drupal-8-plugins-explained).

## 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](modules/plug_example/plug_example.module) shipped with this module that will show you how to create your plugins and use them.

Expand All @@ -25,15 +28,7 @@ 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
This module relies on some parts of the Drupal 8 code. Those parts have been very well encapsulated and are highly reusable by any PHP project (including Drupal 7).

This module relies on having this Drupal 8 code imported as a library using the composer manager module. To install the module just install it as usual and then run:

```
drush composer-manager update
```

I can see how these will be exposed in the future as a composer package in [Packagist](https://packagist.org). It has not been done at the moment, so I created [a repo](https://github.com/mateu-aguilo-bosch/d7-plugins) with a copy of the Drupal 8 code as a temporary composer package.
Installation is straightforward. You only need to download and enable the module.

## Implementations
The following modules use the <strong>Plug</strong> module to declare their plugins. If you want your module to be in this list, [open an issue](https://github.com/mateu-aguilo-bosch/plug/issues/new).
Expand Down

0 comments on commit 9579725

Please sign in to comment.