getPublisher() public method

public getPublisher ( ) : Publisher
return Publisher
Esempio n. 1
0
 /**
  * @param SitemapPopulateEvent $event
  * @param Journal $journal
  * @return SitemapPopulateEvent
  */
 private function generateIssueLinks(SitemapPopulateEvent $event, Journal $journal)
 {
     $issues = $journal->getIssues();
     /** @var Issue $issue */
     foreach ($issues as $issue) {
         $event->getGenerator()->addUrl(new UrlConcrete($this->router->generate('ojs_issue_page', ['publisher' => $journal->getPublisher()->getSlug(), 'journal_slug' => $journal->getSlug(), 'id' => $issue->getId()], true), new \DateTime(), UrlConcrete::CHANGEFREQ_WEEKLY, 1), 'journals-' . $journal->getSlug());
         $event = $this->generateArticleLinks($event, $issue);
     }
     return $event;
 }
Esempio n. 2
0
 /**
  *
  * @param  Journal $journal
  * @return string
  */
 public function generateUrl(Journal $journal)
 {
     $publisher = $journal->getPublisher();
     $publisherSlug = $publisher ? $publisher->getSlug() : $this->defaultPublisherSlug;
     return $this->router->generate('ojs_journal_index', array('slug' => $journal->getSlug(), 'publisher' => $publisherSlug), Router::ABSOLUTE_URL);
 }