Newscoop\IssueServiceInterface::getIssue PHP Метод

getIssue() публичный Метод

Get Issue object
public getIssue ( ) : Issue
Результат Newscoop\Entity\Issue Issue entity object
    public function getIssue();

Usage Example

Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function getThemePath()
 {
     $issue = $this->issueService->getIssue();
     if (!$issue) {
         return;
     }
     $languageId = $issue->getLanguageId();
     $publication = $this->publicationService->getPublication();
     $cacheKeyThemePath = $this->cacheService->getCacheKey(array('getThemePath', $languageId, $publication->getId(), $issue->getNumber()), 'issue');
     $themePath = null;
     $webOutput = null;
     $outSetIssues = null;
     if ($this->cacheService->contains($cacheKeyThemePath)) {
         $themePath = $this->cacheService->fetch($cacheKeyThemePath);
     } else {
         $cacheKeyWebOutput = $this->cacheService->getCacheKey(array('OutputService', 'Web'), 'outputservice');
         if ($this->cacheService->contains($cacheKeyWebOutput)) {
             $webOutput = $this->cacheService->fetch($cacheKeyWebOutput);
         } else {
             $webOutput = $this->findByName('Web');
             $this->cacheService->save($cacheKeyWebOutput, $webOutput);
         }
         $outSetIssues = $this->findByIssueAndOutput($issue->getId(), $webOutput);
         if (!is_null($outSetIssues)) {
             $themePath = $outSetIssues->getThemePath()->getPath();
         }
         $this->cacheService->save($cacheKeyThemePath, $themePath);
     }
     return $themePath;
 }
All Usage Examples Of Newscoop\IssueServiceInterface::getIssue