Issue #2989657 by tetranz, Vidushi Mehta, longwave, Chris2, alexpott: Minor user interface text correction in BlockContentDeleteForm
							parent
							
								
									8735b60b8c
								
							
						
					
					
						commit
						c0ab589d67
					
				| 
						 | 
					@ -3,7 +3,6 @@
 | 
				
			||||||
namespace Drupal\block_content\Form;
 | 
					namespace Drupal\block_content\Form;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Drupal\Core\Entity\ContentEntityDeleteForm;
 | 
					use Drupal\Core\Entity\ContentEntityDeleteForm;
 | 
				
			||||||
use Drupal\Core\Form\FormStateInterface;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Provides a confirmation form for deleting a custom block entity.
 | 
					 * Provides a confirmation form for deleting a custom block entity.
 | 
				
			||||||
| 
						 | 
					@ -15,15 +14,12 @@ class BlockContentDeleteForm extends ContentEntityDeleteForm {
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * {@inheritdoc}
 | 
					   * {@inheritdoc}
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  public function buildForm(array $form, FormStateInterface $form_state) {
 | 
					  public function getDescription() {
 | 
				
			||||||
    $instances = $this->entity->getInstances();
 | 
					    $instances = $this->entity->getInstances();
 | 
				
			||||||
 | 
					    if (!empty($instances)) {
 | 
				
			||||||
    $form['message'] = [
 | 
					      return $this->formatPlural(count($instances), 'This will also remove 1 placed block instance. This action cannot be undone.', 'This will also remove @count placed block instances. This action cannot be undone.');
 | 
				
			||||||
      '#markup' => $this->formatPlural(count($instances), 'This will also remove 1 placed block instance.', 'This will also remove @count placed block instances.'),
 | 
					    }
 | 
				
			||||||
      '#access' => !empty($instances),
 | 
					    return parent::getDescription();
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return parent::buildForm($form, $form_state);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue