Skip to content
Snippets Groups Projects

EntityQuery accessCheck: bundle delete forms should warn of content at risk regardless of access

2 unresolved threads
4 files
+ 4
0
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -17,6 +17,7 @@ class BlockContentTypeDeleteForm extends EntityDeleteForm {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$blocks = $this->entityTypeManager->getStorage('block_content')->getQuery()
->accessCheck(FALSE)
->condition('type', $this->entity->id())
->execute();
if (!empty($blocks)) {
Loading