src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php
protected function getEntityVersionLocksByLockableEntity(LockableEntity $entity, User $userToExclude = null)
    {
        /** @var EntityVersionLockRepository $objectRepository */
        $objectRepository = $this->objectManager->getRepository('KunstmaanAdminListBundle:EntityVersionLock');

        return $objectRepository->getLocksForLockableEntity($entity, $this->threshold, $userToExclude);
    }
protected function getEntityVersionLocksByLockableEntity(LockableEntity $entity, User $userToExclude = null)
    {
        /** @var EntityVersionLockRepository $objectRepository */
        $objectRepository = $this->objectManager->getRepository('KunstmaanAdminListBundle:EntityVersionLock');

        return $objectRepository->getLocksForLockableEntity($entity, $this->threshold, $userToExclude);
    }
protected function getEntityVersionLocksByLockableEntity ( LockableEntity $ entity , User $ userToExclude = null ) { /** @var EntityVersionLockRepository $objectRepository */ $ objectRepository = $ this -> objectManager -> getRepository ( 'KunstmaanAdminListBundle:EntityVersionLock' ) ; return $ objectRepository -> getLocksForLockableEntity ( $ entity , $ this -> threshold , $ userToExclude ) ; }
When editing an entity, check if there is a lock for this entity.

@param LockableEntity $entity
@param User           $userToExclude

@return EntityVersionLock[]
When editing an entity check if there is a lock for this entity .