public function listAction()
    {
        $lockManager = $this->get('phlexible_element.element_lock_manager');
        $userManager = $this->get('phlexible_user.user_manager');

        $locks = $lockManager->findAll();

        $data = [];
        foreach ($locks as $lock) {
            /* @var $lock ElementLock */
            $username = '(unknown user)';
            $user = $userManager->find($lock->getUserId());
            if ($user) {
                $username = $user->getDisplayName();
            }

            $data[] = [
                'id' => $lock->getId(),
                'uid' => $lock->getUserId(),
                'user' => $username,
                'ts' => $lock->getLockedAt()->format('Y-m-d H:i:s'),
                'eid' => $lock->getElement()->getEid(),
                'lock_type' => $lock->getType(),
            ];
        }

        return new JsonResponse(['locks' => $data]);
    }