Skip to content
Snippets Groups Projects

Issue #3231996: Ensure file system is writeable

1 unresolved thread
2 files
+ 30
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 26
0
 
<?php
 
 
namespace Drupal\automatic_updates\Validator;
 
 
use Drupal\automatic_updates\AutomaticUpdatesEvents;
 
use Drupal\automatic_updates\Event\UpdateEvent;
 
use Drupal\automatic_updates\Validation\ValidationResult;
 
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
 
class WritableFileSystemValidator implements EventSubscriberInterface {
 
 
public function checkFileSystemWritable(UpdateEvent $event){
 
$result = ValidationResult::createError([t('file system not writable')]);
 
$event->addValidationResult($result);
 
\Drupal::messenger()->addMessage("GOT HERE");
 
}
 
/**
 
* {@inheritdoc}
 
*/
 
public static function getSubscribedEvents() {
 
return [
 
AutomaticUpdatesEvents::READINESS_CHECK => 'checkFileSystemWritable',
 
];
 
}
 
 
}
Loading