Factory/TranslatableFactory.php
public function createNew()
    {
        $resource = $this->factory->createNew();

        if (!$resource instanceof TranslatableInterface) {
            throw new UnexpectedTypeException($resource, TranslatableInterface::class);
        }

        $resource->setCurrentLocale($this->localeProvider->getCurrentLocale());
        $resource->setFallbackLocale($this->localeProvider->getFallbackLocale());

        return $resource;
    }
public function createNew()
    {
        $resource = $this->factory->createNew();

        if (!$resource instanceof TranslatableInterface) {
            throw new UnexpectedTypeException($resource, TranslatableInterface::class);
        }

        $resource->setCurrentLocale($this->localeProvider->getCurrentLocale());
        $resource->setFallbackLocale($this->localeProvider->getFallbackLocale());

        return $resource;
    }
public function createNew ( ) { $ resource = $ this -> factory -> createNew ( ) ; if ( ! $ resource instanceof TranslatableInterface ) { throw new UnexpectedTypeException ( $ resource , TranslatableInterface :: class ) ; } $ resource -> setCurrentLocale ( $ this -> localeProvider -> getCurrentLocale ( ) ) ; $ resource -> setFallbackLocale ( $ this -> localeProvider -> getFallbackLocale ( ) ) ; return $ resource ; }
{@inheritdoc}
{