findById() public method

Searches for a filter by id.
public findById ( $id ) : mixed
$id
return mixed
Example #1
0
 /**
  * {@inheritdoc}
  */
 public function delete($id)
 {
     $filter = $this->filterRepository->findById($id);
     if (!$filter) {
         throw new FilterNotFoundException($id);
     }
     $this->em->remove($filter);
     $this->em->flush();
 }