Newer
Older
use Composer\Composer;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
use Composer\Script\ScriptEvents;
/**
* Composer plugin for preparing Drupal project for development with dorgflow.
*/
class Plugin implements PluginInterface, EventSubscriberInterface {
/**
*/
protected $handler;
/**
* {@inheritdoc}
*/
public function activate(Composer $composer, IOInterface $io) {
$this->handler = new Handler($composer, $io);
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return array(
ScriptEvents::POST_INSTALL_CMD => 'prepareDevProjects',
ScriptEvents::POST_UPDATE_CMD => 'prepareDevProjects',
public function prepareDevProjects($event) {
$this->handler->prepareDevProjects($event);