Newscoop\Service\Implementation\OutputSettingIssueServiceDoctrine::findByIssue PHP Method

findByIssue() public method

Provides the Output Settings Issue for the provided issue
public findByIssue ( Issue | integer $issue ) : array
$issue Newscoop\Entity\Issue | integer The issue to be searched, not null, not empty.
return array Newscoop\Entity\Output\OutputSettingsIssue The Output Setting, empty array if no Output Setting could be found for the provided issue.
    public function findByIssue($issue)
    {
        if ($issue instanceof Issue) {
            $issue = $issue->getId();
        }
        $em = $this->getManager();
        $repository = $em->getRepository($this->entityClassName);
        $resources = $repository->findByIssue($issue);
        if (isset($resources) && count($resources) > 0) {
            return $resources;
        }
        return array();
    }