Skip to content

Commit

Permalink
Add test for other possible translation attribute arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Dec 10, 2023
1 parent dedb872 commit 842f593
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/**
* A basic example action that does nothing.
*
* @Action(
* id = "action_example_basic_action",
* action_label = @Translation("Action Example: A basic example action that does nothing and has an @argument", context = "Validation", arguments = {"@argument" = "Argument"}),
* type = "system"
* )
*/
class BasicExample extends ActionBase implements ContainerFactoryPluginInterface {

}
?>

-----
<?php

/**
* A basic example action that does nothing.
*/
#[\Drupal\Core\Action\Attribute\Action(id: 'action_example_basic_action', action_label: new Drupal\Core\StringTranslation\TranslatableMarkup('Action Example: A basic example action that does nothing', ['@argument' => 'Argument'], ['context' => 'Validation']), type: 'system')]
class BasicExample extends ActionBase implements ContainerFactoryPluginInterface {

}
?>

0 comments on commit 842f593

Please sign in to comment.