Code Coverage  | 
     ||||||||||
Classes and Traits  | 
      Functions and Methods  | 
      Lines  | 
     ||||||||
| Total |         | 
      0.00%  | 
      0 / 1  | 
              | 
      0.00%  | 
      0 / 3  | 
      CRAP |         | 
      0.00%  | 
      0 / 9  | 
     
| MenuLinkContentDeleteForm |         | 
      0.00%  | 
      0 / 1  | 
              | 
      0.00%  | 
      0 / 3  | 
      20 |         | 
      0.00%  | 
      0 / 9  | 
     
| getCancelUrl |         | 
      0.00%  | 
      0 / 1  | 
      6 |         | 
      0.00%  | 
      0 / 5  | 
     |||
| getRedirectUrl |         | 
      0.00%  | 
      0 / 1  | 
      2 |         | 
      0.00%  | 
      0 / 2  | 
     |||
| getDeletionMessage |         | 
      0.00%  | 
      0 / 1  | 
      2 |         | 
      0.00%  | 
      0 / 2  | 
     |||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\menu_link_content\Form\MenuLinkContentDeleteForm. | |
| */ | |
| namespace Drupal\menu_link_content\Form; | |
| use Drupal\Core\Entity\ContentEntityDeleteForm; | |
| use Drupal\Core\Url; | |
| /** | |
| * Provides a delete form for content menu links. | |
| */ | |
| class MenuLinkContentDeleteForm extends ContentEntityDeleteForm { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getCancelUrl() { | |
| if ($this->moduleHandler->moduleExists('menu_ui')) { | |
| return new Url('entity.menu.edit_form', array('menu' => $this->entity->getMenuName())); | |
| } | |
| return $this->entity->urlInfo(); | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| protected function getRedirectUrl() { | |
| return $this->getCancelUrl(); | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| protected function getDeletionMessage() { | |
| return $this->t('The menu link %title has been deleted.', array('%title' => $this->entity->label())); | |
| } | |
| } |