Files: 
CommentFileSizeAuthor
#6 2022415-custom-block-type-confirm-delete-form-6.patch7.94 KBbdone
PASSED: [[SimpleTest]]: [MySQL] 58,088 pass(es).
[ View ]
#5 2022415-custom-block-type-confirm-delete-form-5.patch7.9 KBbdone
FAILED: [[SimpleTest]]: [MySQL] 58,106 pass(es), 0 fail(s), and 2 exception(s).
[ View ]
#3 2022415-custom-block-type-confirm-delete-form-3.patch7.43 KBbdone
FAILED: [[SimpleTest]]: [MySQL] 57,820 pass(es), 0 fail(s), and 2 exception(s).
[ View ]
#1 2022415-custom-block-type-confirm-delete-form-1.patch6.7 KBbdone
PASSED: [[SimpleTest]]: [MySQL] 57,825 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new6.7 KB
PASSED: [[SimpleTest]]: [MySQL] 57,825 pass(es).
[ View ]

here's a first pass at this one

+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php
@@ -0,0 +1,80 @@
+    $blocks = \Drupal::entityQuery('custom_block')->condition('type', $this->blockType->id())->execute();

We should be able to inject the query factory here rather than calling \Drupal::

StatusFileSize
new7.43 KB
FAILED: [[SimpleTest]]: [MySQL] 57,820 pass(es), 0 fail(s), and 2 exception(s).
[ View ]

here's another pass implementing ControllerInterface and using query factory

Status:Needs review» Needs work

The last submitted patch, 2022415-custom-block-type-confirm-delete-form-3.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new7.9 KB
FAILED: [[SimpleTest]]: [MySQL] 58,106 pass(es), 0 fail(s), and 2 exception(s).
[ View ]

here's another go using EntityConfirmFormBase instead of ConfirmFormBase, since custom_block is an entity

StatusFileSize
new7.94 KB
PASSED: [[SimpleTest]]: [MySQL] 58,088 pass(es).
[ View ]

adding use QueryFactory statement to pass tests

Status:Needs review» Reviewed & tested by the community

This is good to go

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.