5 use Contracts\FactoryInterface;
6 use Drupal\Core\Entity\EntityRepository;
7 use Drupal\Core\File\FileSystem;
17 private $entityRepository;
19 private $jobStoreFactory;
25 EntityRepository $entityRepository,
26 FileSystem $fileSystem,
29 $this->entityRepository = $entityRepository;
30 $this->fileSystem = $fileSystem;
31 $this->jobStoreFactory = $jobStoreFactory;
39 public function getInstance(
string $identifier, array $config = []) {
40 if (!isset($this->services[$identifier])) {
41 $this->services[$identifier] =
new Instance($identifier, $this->entityRepository, $this->fileSystem, $this->jobStoreFactory);
44 return $this->services[$identifier];