public function AjaxController::__construct in S3 File System CORS Upload 8
AjaxController constructor.
Parameters
\Drupal\s3fs\S3fsServiceInterface $s3fs: The S3fs service interface.
\Drupal\Core\Database\Connection $database: The Drupal database connection service.
\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface $mimeType: The mime type guesser service.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory: The core logger factory service.
Throws
\Drupal\s3fs\S3fsException The S3fs exception.
File
- src/
Controller/ AjaxController.php, line 64
Class
- AjaxController
- Default controller for the s3fs_cors module.
Namespace
Drupal\s3fs_cors\ControllerCode
public function __construct(S3fsServiceInterface $s3fs, Connection $database, MimeTypeGuesserInterface $mimeType, LoggerChannelFactoryInterface $loggerFactory) {
$s3_config = $this
->config('s3fs.settings')
->get();
$this->s3Client = $s3fs
->getAmazonS3Client($s3_config);
$this->database = $database;
$this->mimeType = $mimeType;
$this->logger = $loggerFactory
->get('s3fs');
}