public MenuDeleteForm::getDescription()
Returns additional text to display as a description.
Return value
string The form description.
Overrides EntityConfirmFormBase::getDescription
File
- core/modules/menu_ui/src/Form/MenuDeleteForm.php, line 56
Class
- MenuDeleteForm
- Defines a confirmation form for deletion of a custom menu.
Namespace
Drupal\menu_ui\Form
Code
1 2 3 4 5 6 7 8 9 | public function getDescription() { $caption = '' ; $num_links = $this ->menuLinkManager->countMenuLinks( $this ->entity->id()); if ( $num_links ) { $caption .= '<p>' . $this ->formatPlural( $num_links , '<strong>Warning:</strong> There is currently 1 menu link in %title. It will be deleted (system-defined items will be reset).' , '<strong>Warning:</strong> There are currently @count menu links in %title. They will be deleted (system-defined links will be reset).' , array ( '%title' => $this ->entity->label())) . '</p>' ; } $caption .= '<p>' . t( 'This action cannot be undone.' ) . '</p>' ; return $caption ; } |
Please login to continue.