Following the current Doctrine class, the first array is the list of criteria and the second the order of the request (desc, asc) :
/**
* Finds entities by a set of criteria.
*
* @param array $criteria
* @param array|null $orderBy
* @param int|null $limit
* @param int|null $offset
*
* @return array The objects.
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->loadAll($criteria, $orderBy, $limit, $offset);
}
So your method seems to be wrong. And maybe you should do something like this (I don't know what you have in secteur and slug).
return $this->repository->findBy(array('secteur'=>$secteur,'slug'=>$slug));