Returns the TransUnit repository.

@return TranslationRepository
513921
protected function getTranslationRepository()
    {
        if (null === $this->translationRepository) {
            $this->translationRepository = new TranslationRepository($this->getConnection());
        }

        return $this->translationRepository;
    }
401964
protected function getRepositoryFactory()
    {
        if (!array_key_exists('repository_factory', $this->options)) {
            return;
        }

        $repositoryFactory = $this->options['repository_factory'];

        if (!$repositoryFactory instanceof RepositoryFactory) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid factory class "%s". It must be a Doctrine\ORM\Repository\RepositoryFactory.',
                get_class($repositoryFactory)
            ));
        }

        return $repositoryFactory;
    }
888401
public function createTranslator()
    {
        return $this
            ->entityTranslatorFactory
            ->create(
                $this->entityTranslationProvider,
                $this->configuration,
                $this->fallback
            );
    }
1186257
public function getUserEntityRepository() 
    {
    	if(isset($this->er['User'])) {
    		return $this->er['User'];
    	}
    	$entityRepository = $this->getEntityManager()->getRepository('Neobazaar\Entity\User');
    	$entityRepository->setServiceLocator($this->getServiceManager());
    	$this->er['User'] = $entityRepository;
    	
    	return $this->er['User'];
    }
1221752
public function getStatRepository()
    {
        if (!$this->em->isOpen()) {
            $this->em = $this->em->create(
                $this->em->getConnection(),
                $this->em->getConfiguration(),
                $this->em->getEventManager()
            );
        }

        return $this->em->getRepository('MauticContactClientBundle:Stat');
    }
549900
public function getReferenceRepository()
    {
        if ( ! $this->referenceRepository) {
            $this->referenceRepository = new ProxyReferenceRepository($this->entityManager);
        }

        return $this->referenceRepository;
    }
214524
public function getTranslationsAttribute()
    {
        if (!settings('is_multilanguage') || !ContentType::find($this->type_id)->translatable)
            return null;

        $parent = $this->translation_id !== null ? Content::where('id', $this->translation_id)->first() : Content::where('id', $this->id)->first();
        $translations = Content::where('translation_id', $parent->id)->get();

        return $translations->merge([$parent]);
    }
562747
public function getTranslationFile()
    {
        $returnValue = null;

        
    	if ($this->translationFile != null) {
        	return $this->translationFile;
        }
        else {
        	throw new tao_helpers_translation_TranslationException('No TranslationFile to retrieve.');
        }
        

        return $returnValue;
    }
296346
public function getRepositoryFactory(): RepositoryFactoryInterface
    {
        if (null !== $this->repositoryFactory) {
            return $this->repositoryFactory;
        }

        $factory = new DefaultRepositoryFactory();
        $factory->setDefaultRepositoryClassName($this->getDefaultRepositoryClassName());

        return $factory;
    }
1278555
public function translations()
    {
        $model = '\\'.get_class($this);

        if (isset($this->translatable))
        {
            return $model::where('translation_of', $this->id)->get();
        }

        return collect();
    }
797100
public function getTranslateService()
    {
        if ($this->translateService === null) {
            $this->translateService = $this->getServiceLocator()->get('playgroundtranslate_translate_service');
        }
        return $this->translateService;
    }
1167153
public function getTranslationFile(TransUnitInterface & $transUnit, $locale)
    {
        $file = null;
        foreach ($transUnit->getTranslations() as $translation) {
            if (null !== $file = $translation->getFile()) {
                break;
            }
        }

        //if we found a file
        if ($file !== null) {
            //make sure we got the correct file for this locale and domain
            $name = sprintf('%s.%s.%s', $file->getDomain(), $locale, $file->getExtention());
            $file = $this->fileManager->getFor($name, $this->kernelRootDir.DIRECTORY_SEPARATOR.$file->getPath());
        }

        return $file;
    }
1361947
public function getEntityRepository() {
    if (empty($this->entityRepository)) {
      $this->entityRepository = \Drupal::service('entity.repository');
    }
    return $this->entityRepository;
  }
357431
public function getEloquentRepository()
    {
        $repositoryGenerator = new RepositoryEloquentGenerator([
            'name' => $this->name,
        ]);

        $repository = $repositoryGenerator->getRootNamespace() . '\\' . $repositoryGenerator->getName();

        return str_replace([
            "\\",
            '/'
        ], '\\', $repository) . 'RepositoryEloquent';
    }
37043
public function getResourceRepository() {
		if ($this->resourceRepository === null) {
			$this->resourceRepository = $this->getPuliFactory()->createRepository();
		}

		return $this->resourceRepository;
	}
371955
public function getOrderUnit()
    {
        $unit = $this->entity->getOrderUnit();
        if (!is_null($unit)) {
            return new Unit($unit, $this->locale);
        }

        return null;
    }
1252538
public function getTranslator()
    {
        if (!$this->_translator instanceof ComActivitiesActivityTranslatorInterface)
        {
            $translator = $this->getObject('translator');

            if (!$translator instanceof ComActivitiesActivityTranslatorInterface) {
                $translator = $translator->decorate($this->_translator);
                $this->getObject('manager')->setObject('translator', $translator);
            }

            $this->setTranslator($translator);
        }

        return $this->_translator;
    }