Unverified Commit 1ca32fdc authored by alexpott's avatar alexpott
Browse files

Issue #3107617 by Hardik_Patel_12: t() calls should be avoided , use...

Issue #3107617 by Hardik_Patel_12: t() calls should be avoided , use $this->t() instead in Workflow module
parent d384ad74
......@@ -120,7 +120,7 @@ public function form(array $form, FormStateInterface $form_state) {
];
if ($this->entity->access('delete-state:' . $state->id())) {
$links['delete'] = [
'title' => t('Delete'),
'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_state_form', [
'workflow' => $workflow->id(),
'workflow_state' => $state->id(),
......@@ -133,7 +133,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#weight' => $state->weight(),
'weight' => [
'#type' => 'weight',
'#title' => t('Weight for @title', ['@title' => $state->label()]),
'#title' => $this->t('Weight for @title', ['@title' => $state->label()]),
'#title_display' => 'invisible',
'#default_value' => $state->weight(),
'#attributes' => ['class' => ['state-weight']],
......@@ -183,7 +183,7 @@ public function form(array $form, FormStateInterface $form_state) {
'url' => Url::fromRoute('entity.workflow.edit_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]),
];
$links['delete'] = [
'title' => t('Delete'),
'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]),
];
$form['transitions_container']['transitions'][$transition->id()] = [
......@@ -192,7 +192,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#weight' => $transition->weight(),
'weight' => [
'#type' => 'weight',
'#title' => t('Weight for @title', ['@title' => $transition->label()]),
'#title' => $this->t('Weight for @title', ['@title' => $transition->label()]),
'#title_display' => 'invisible',
'#default_value' => $transition->weight(),
'#attributes' => ['class' => ['transition-weight']],
......
......@@ -125,7 +125,7 @@ public function form(array $form, FormStateInterface $form_state) {
]),
];
$links['delete'] = [
'title' => t('Delete'),
'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_transition_form', [
'workflow' => $workflow->id(),
'workflow_transition' => $transition->id(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment