Importer/PKP/JournalImporter.php
private function getUnknownPublisher($locale)
    {
        $translation = $this->em
            ->getRepository('VipaJournalBundle:PublisherTranslation')
            ->findOneBy(['name' => 'Unknown Publisher']);
        $publisher = $translation !== null ? $translation->getTranslatable() : null;

        if (!$publisher) {
            $publisher = $this->createPublisher('Unknown Publisher', 'http://example.com', $locale);
            $publisher->setCurrentLocale(mb_substr($locale, 0, 2, 'UTF-8'))->setAbout('-');
            $this->em->persist($publisher);
        }

        return $publisher;
    }
private function getUnknownPublisher($locale)
    {
        $translation = $this->em
            ->getRepository('VipaJournalBundle:PublisherTranslation')
            ->findOneBy(['name' => 'Unknown Publisher']);
        $publisher = $translation !== null ? $translation->getTranslatable() : null;

        if (!$publisher) {
            $publisher = $this->createPublisher('Unknown Publisher', 'http://example.com', $locale);
            $publisher->setCurrentLocale(mb_substr($locale, 0, 2, 'UTF-8'))->setAbout('-');
            $this->em->persist($publisher);
        }

        return $publisher;
    }
private function getUnknownPublisher ( $ locale ) { $ translation = $ this -> em -> getRepository ( 'VipaJournalBundle:PublisherTranslation' ) -> findOneBy ( [ 'name' => 'Unknown Publisher' ] ) ; $ publisher = $ translation !== null ? $ translation -> getTranslatable ( ) : null ; if ( ! $ publisher ) { $ publisher = $ this -> createPublisher ( 'Unknown Publisher' , 'http://example.com' , $ locale ) ; $ publisher -> setCurrentLocale ( mb_substr ( $ locale , 0 , 2 , 'UTF-8' ) ) -> setAbout ( '-' ) ; $ this -> em -> persist ( $ publisher ) ; } return $ publisher ; }
Fetches the publisher with the name "Unknown Publisher".
@param string $locale Locale of translatable fields
@return Publisher Publisher with the name "Unknown Publisher"
Fetches the publisher with the name Unknown Publisher .