src/Sulu/Bundle/AudienceTargetingBundle/Controller/TargetGroupController.php
private function retrieveTargetGroupById($id)
    {
        /** @var TargetGroupInterface $targetGroup */
        $targetGroup = $this->getTargetGroupRepository()->find($id);

        if (!$targetGroup) {
            throw new EntityNotFoundException($this->getTargetGroupRepository()->getClassName(), $id);
        }

        return $targetGroup;
    }
private function retrieveTargetGroupById($id)
    {
        /** @var TargetGroupInterface $targetGroup */
        $targetGroup = $this->getTargetGroupRepository()->find($id);

        if (!$targetGroup) {
            throw new EntityNotFoundException($this->getTargetGroupRepository()->getClassName(), $id);
        }

        return $targetGroup;
    }
private function retrieveTargetGroupById ( $ id ) { /** @var TargetGroupInterface $targetGroup */ $ targetGroup = $ this -> getTargetGroupRepository ( ) -> find ( $ id ) ; if ( ! $ targetGroup ) { throw new EntityNotFoundException ( $ this -> getTargetGroupRepository ( ) -> getClassName ( ) , $ id ) ; } return $ targetGroup ; }
Returns target group by id. Throws an exception if not found.

@param int $id

@throws EntityNotFoundException

@return TargetGroupInterface
Returns target group by id . Throws an exception if not found .