Skip to content
Snippets Groups Projects

Issue #3362627 by tgoeg: Make timeout configurable

2 unresolved threads
7 files
+ 88
0
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Drupal\file_extractor\Extractor;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Messenger\MessengerInterface;
@@ -11,6 +12,7 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\StreamWrapper\StreamWrapperInterface;
use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface;
use Drupal\file_extractor\Service\ExtractorManager;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Mime\MimeTypeGuesserInterface;
@@ -50,6 +52,13 @@ abstract class ExtractorPluginBase extends PluginBase implements ContainerFactor
*/
protected EntityTypeManagerInterface $entityTypeManager;
/**
* The extractor manager.
*
* @var \Drupal\file_extractor\Service\ExtractorManager
*/
protected $extractorManager;
/**
* {@inheritdoc}
*/
@@ -57,6 +66,7 @@ abstract class ExtractorPluginBase extends PluginBase implements ContainerFactor
array $configuration,
$plugin_id,
array $plugin_definition,
ExtractorManager $extractorManager,
StreamWrapperManagerInterface $stream_wrapper_manager,
MimeTypeGuesserInterface $mime_type_guesser,
LoggerInterface $logger,
@@ -64,6 +74,7 @@ abstract class ExtractorPluginBase extends PluginBase implements ContainerFactor
MessengerInterface $messenger,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->extractorManager = $extractorManager;
$this->streamWrapperManager = $stream_wrapper_manager;
$this->mimeTypeGuesser = $mime_type_guesser;
$this->logger = $logger;
@@ -79,6 +90,7 @@ abstract class ExtractorPluginBase extends PluginBase implements ContainerFactor
$configuration,
$plugin_id,
$plugin_definition,
$container->get('file_extractor.extractor_manager'),
$container->get('stream_wrapper_manager'),
$container->get('file.mime_type.guesser'),
$container->get('logger.channel.file_extractor'),
Loading