Ejemplo n.º 1
0
 /**
  * @param PackageEvent $event
  */
 public function onDisablePackage(PackageEvent $event)
 {
     $package = $event->getPackage();
     if ($package->getRemote()->getAdapter() !== 'GitHub') {
         return;
     }
     $this->adapter->disableHook($package);
 }
Ejemplo n.º 2
0
 /**
  * @param RemoteEvent $event
  */
 public function onDisableRemote(RemoteEvent $event)
 {
     $remote = $event->getRemote();
     if ($remote->getAdapter() !== 'GitHub') {
         return;
     }
     $packages = $this->entityManager->getRepository('Terramar\\Packages\\Entity\\Package')->findBy(array('remote' => $remote));
     foreach ($packages as $package) {
         $this->adapter->disableHook($package);
         $package->setEnabled(false);
     }
 }