diff --git a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php index 8e0292b..ef05717 100644 --- a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php @@ -25,6 +25,13 @@ /** * {@inheritdoc} */ + public function getBaseFormID() { + return $this->entity->entityType() . '_confirm_form'; + } + + /** + * {@inheritdoc} + */ public function getDescription() { return t('This action cannot be undone.'); } diff --git a/core/lib/Drupal/Core/Entity/EntityNGConfirmFormBase.php b/core/lib/Drupal/Core/Entity/EntityNGConfirmFormBase.php index 1c345a0..fd04241 100644 --- a/core/lib/Drupal/Core/Entity/EntityNGConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/EntityNGConfirmFormBase.php @@ -25,6 +25,13 @@ /** * {@inheritdoc} */ + public function getBaseFormID() { + return $this->entity->entityType() . '_confirm_form'; + } + + /** + * {@inheritdoc} + */ public function getDescription() { return t('This action cannot be undone.'); } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 1d90683..fbdf07d 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1919,11 +1919,6 @@ function theme_node_recent_content($variables) { * Adds node-type specific visibility options to block configuration form. */ function node_form_block_form_alter(&$form, &$form_state) { - // These options should be added to most block forms, but not when deleting. - if ($form_state['controller']->getOperation() == 'delete') { - return; - } - $block = $form_state['controller']->getEntity(); $visibility = $block->get('visibility'); $form['visibility']['node_type'] = array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php index be78113..6d3b693 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php @@ -8,15 +8,15 @@ namespace Drupal\taxonomy\Form; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; -use Drupal\Core\Entity\EntityConfirmFormBase; +use Drupal\Core\Entity\EntityNGConfirmFormBase; use Drupal\Core\Cache\Cache; /** * Provides a deletion confirmation form for taxonomy term. */ -class TermDeleteForm extends EntityConfirmFormBase implements ControllerInterface { +class TermDeleteForm extends EntityNGConfirmFormBase implements EntityControllerInterface { /** * The taxonomy vocabulary storage controller. @@ -38,7 +38,7 @@ public function __construct(EntityStorageControllerInterface $storage_controller /** * {@inheritdoc} */ - public static function create(ContainerInterface $container) { + public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary') );