TransactionDeleteForm.php in Transaction 8
File
src/Form/TransactionDeleteForm.php
View source
<?php
namespace Drupal\transaction\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
class TransactionDeleteForm extends ContentEntityDeleteForm {
protected function getDeletionMessage() {
$msg_args = [
'@type' => $this
->getEntity()
->get('type')->entity
->label(),
'%description' => $this
->getEntity()
->label(),
];
return $this
->t('The transaction %description of type @type has been deleted.', $msg_args);
}
public function getCancelUrl() {
$entity = $this
->getEntity();
return $entity
->getTargetEntityId() ? $entity
->toUrl('collection', [
'target_entity' => $entity
->getTargetEntityId(),
]) : $entity
->toUrl();
}
}