Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Submodule residence for the Plugin system for D8.

Add to bootstrap.inc:

function plugin($class = 'Drupal\\Plugin\\Mapper') {
  static $mapper;
  if (!empty($mapper[$class])) {
    return $mapper[$class];
  }
  $mapper[$class] = new $class();
  if ($mapper[$class] instanceof Drupal\Plugin\MapperInterface) {
    return $mapper[$class];
  }
  throw new Drupal\Plugin\MapperException("Mapper class does not implement Drupal\\Plugin\\MapperInterface.");
}

Project Information