public findByIssue ( |
||
$issue | 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();
}