public findBySection ( |
||
$section | The section to be searched, not null, not empty. | |
리턴 | Newscoop\Entity\OutputSettingsSection | The Output Setting, empty array if no Output Setting could be found for the provided section. |
public function findBySection($section)
{
if ($section instanceof Section) {
$section = $section->getId();
}
$em = $this->getManager();
$repository = $em->getRepository($this->entityClassName);
$resources = $repository->findBySection($section);
if (isset($resources) && count($resources) > 0) {
return $resources;
}
return array();
}