diff --git a/.editorconfig b/.editorconfig index 6801c475..382eeefd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,3 +19,6 @@ indent_size = 2 [*.twig] insert_final_newline = false + +[tests/comparisons/Template/*.php] +insert_final_newline = false diff --git a/templates/bake/Template/index.twig b/templates/bake/Template/index.twig index dc3852ed..7cab8aa1 100644 --- a/templates/bake/Template/index.twig +++ b/templates/bake/Template/index.twig @@ -65,7 +65,14 @@ Html->link(__('View'), ['action' => 'view', {{ pk|raw }}]) ?> Html->link(__('Edit'), ['action' => 'edit', {{ pk|raw }}]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', {{ pk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }})]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', {{ pk|raw }}], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }}), + ] + ) ?> diff --git a/templates/bake/Template/view.twig b/templates/bake/Template/view.twig index 4957300e..de414135 100644 --- a/templates/bake/Template/view.twig +++ b/templates/bake/Template/view.twig @@ -141,7 +141,14 @@ Html->link(__('View'), ['controller' => '{{ details.controller }}', 'action' => 'view', {{ otherPk|raw }}]) ?> Html->link(__('Edit'), ['controller' => '{{ details.controller }}', 'action' => 'edit', {{ otherPk|raw }}]) ?> - Form->postLink(__('Delete'), ['controller' => '{{ details.controller }}', 'action' => 'delete', {{ otherPk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ otherPk|raw }})]) ?> + Form->postLink( + __('Delete'), + ['controller' => '{{ details.controller }}', 'action' => 'delete', {{ otherPk|raw }}], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', {{ otherPk|raw }}), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeIndex.php b/tests/comparisons/Template/testBakeIndex.php index fe4cc5fa..fbf4e397 100644 --- a/tests/comparisons/Template/testBakeIndex.php +++ b/tests/comparisons/Template/testBakeIndex.php @@ -32,7 +32,14 @@ Html->link(__('View'), ['action' => 'view', $templateTaskComment->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $templateTaskComment->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $templateTaskComment->id], ['confirm' => __('Are you sure you want to delete # {0}?', $templateTaskComment->id)]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $templateTaskComment->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $templateTaskComment->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeIndexHiddenFields.php b/tests/comparisons/Template/testBakeIndexHiddenFields.php index 74e551f0..be4143b6 100644 --- a/tests/comparisons/Template/testBakeIndexHiddenFields.php +++ b/tests/comparisons/Template/testBakeIndexHiddenFields.php @@ -22,7 +22,14 @@ Html->link(__('View'), ['action' => 'view', $hiddenField->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $hiddenField->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $hiddenField->id], ['confirm' => __('Are you sure you want to delete # {0}?', $hiddenField->id)]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $hiddenField->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $hiddenField->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php b/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php index 8f3ee6d1..fa0a20d6 100644 --- a/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php +++ b/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php @@ -28,7 +28,14 @@ Html->link(__('View'), ['action' => 'view', $article->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $article->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $article->id], ['confirm' => __('Are you sure you want to delete # {0}?', $article->id)]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $article->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $article->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php b/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php index b5b49745..ddc33628 100644 --- a/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php +++ b/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php @@ -30,7 +30,14 @@ Html->link(__('View'), ['action' => 'view', $bakeUser->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $bakeUser->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $bakeUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $bakeUser->id)]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $bakeUser->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $bakeUser->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeIndexWithIndexLimit.php b/tests/comparisons/Template/testBakeIndexWithIndexLimit.php index fd6a3bf6..82d7209b 100644 --- a/tests/comparisons/Template/testBakeIndexWithIndexLimit.php +++ b/tests/comparisons/Template/testBakeIndexWithIndexLimit.php @@ -26,7 +26,14 @@ Html->link(__('View'), ['action' => 'view', $templateTaskComment->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $templateTaskComment->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $templateTaskComment->id], ['confirm' => __('Are you sure you want to delete # {0}?', $templateTaskComment->id)]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $templateTaskComment->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $templateTaskComment->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeView.php b/tests/comparisons/Template/testBakeView.php index 6a84c762..d6a8388d 100644 --- a/tests/comparisons/Template/testBakeView.php +++ b/tests/comparisons/Template/testBakeView.php @@ -84,7 +84,14 @@ Html->link(__('View'), ['controller' => 'Articles', 'action' => 'view', $article->id]) ?> Html->link(__('Edit'), ['controller' => 'Articles', 'action' => 'edit', $article->id]) ?> - Form->postLink(__('Delete'), ['controller' => 'Articles', 'action' => 'delete', $article->id], ['confirm' => __('Are you sure you want to delete # {0}?', $article->id)]) ?> + Form->postLink( + __('Delete'), + ['controller' => 'Articles', 'action' => 'delete', $article->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $article->id), + ] + ) ?> diff --git a/tests/comparisons/Template/testBakeViewEnumNoLabel.php b/tests/comparisons/Template/testBakeViewEnumNoLabel.php index e5e0fd4b..fc94c4d7 100644 --- a/tests/comparisons/Template/testBakeViewEnumNoLabel.php +++ b/tests/comparisons/Template/testBakeViewEnumNoLabel.php @@ -62,7 +62,14 @@ Html->link(__('View'), ['controller' => 'tags', 'action' => 'view', $tag->id]) ?> Html->link(__('Edit'), ['controller' => 'tags', 'action' => 'edit', $tag->id]) ?> - Form->postLink(__('Delete'), ['controller' => 'tags', 'action' => 'delete', $tag->id], ['confirm' => __('Are you sure you want to delete # {0}?', $tag->id)]) ?> + Form->postLink( + __('Delete'), + ['controller' => 'tags', 'action' => 'delete', $tag->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $tag->id), + ] + ) ?>