diff --git a/content_lock.module b/content_lock.module index fc94930..2a92c21 100644 --- a/content_lock.module +++ b/content_lock.module @@ -33,7 +33,7 @@ function content_lock_help($route_name, RouteMatchInterface $route_match) { */ function content_lock_entity_type_build(array &$entity_types) { foreach ($entity_types as &$entity_type) { - if ($entity_type instanceof ContentEntityTypeInterface && $entity_type->getBundleEntityType()) { + if ($entity_type instanceof ContentEntityTypeInterface) { if (!$entity_type->hasHandlerClass('break_lock_form')) { $entity_type->setHandlerClass('break_lock_form', '\Drupal\content_lock\Form\EntityBreakLockForm'); } diff --git a/src/Form/ContentLockSettingsForm.php b/src/Form/ContentLockSettingsForm.php index 0fdca8a..3047c70 100644 --- a/src/Form/ContentLockSettingsForm.php +++ b/src/Form/ContentLockSettingsForm.php @@ -116,6 +116,9 @@ class ContentLockSettingsForm extends ConfigFormBase { $options[$bundle->id()] = $bundle->label(); } } + else { + $options[$definition->id()] = $definition->getLabel(); + } $form['entities'][$definition->id()]['bundles'] = [ '#type' => 'checkboxes', diff --git a/src/Routing/BreakLockRoutes.php b/src/Routing/BreakLockRoutes.php index 78c0417..3601a0b 100644 --- a/src/Routing/BreakLockRoutes.php +++ b/src/Routing/BreakLockRoutes.php @@ -41,7 +41,7 @@ class BreakLockRoutes implements ContainerInjectionInterface { $definitions = $this->entityTypeManager->getDefinitions(); foreach ($definitions as $definition) { - if ($definition instanceof ContentEntityTypeInterface && $definition->getBundleEntityType()) { + if ($definition instanceof ContentEntityTypeInterface) { $routes['content_lock.break_lock.' . $definition->id()] = new Route( '/admin/break-lock/' . $definition->id() . '/{entity}/{langcode}', [