protected function ContentTranslationPendingRevisionTestBase::getDeleteUrl in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationPendingRevisionTestBase::getDeleteUrl()
Returns the delete translation URL for the specified entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity being edited.
Return value
\Drupal\Core\Url The delete translation URL.
1 call to ContentTranslationPendingRevisionTestBase::getDeleteUrl()
- ContentTranslationRevisionTranslationDeletionTest::doTestOverview in core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationRevisionTranslationDeletionTest.php - Performs a test run.
File
- core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationPendingRevisionTestBase.php, line 173
Class
- ContentTranslationPendingRevisionTestBase
- Base class for pending revision translation tests.
Namespace
Drupal\Tests\content_translation\FunctionalCode
protected function getDeleteUrl(ContentEntityInterface $entity) {
if ($entity
->access('delete', $this->loggedInUser)) {
$url = $entity
->toUrl('delete-form');
}
else {
$url = $entity
->toUrl('drupal:content-translation-delete');
$url
->setRouteParameter('language', $entity
->language()
->getId());
}
return $url;
}