public function findByIssueAndOutput($issue, $output)
{
$outputId = $output;
if ($output instanceof Output) {
$outputId = $output->getId();
}
$issueId = $issue;
if ($issue instanceof Issue) {
$issueId = $issue->getId();
}
$resources = $this->em->getRepository('Newscoop\\Entity\\Output\\OutputSettingsIssue')->findBy(array('issue' => $issueId, 'output' => $outputId));
if (!empty($resources)) {
return $resources[0];
}
return null;
}