Issue #3107617 by Hardik_Patel_12: t() calls should be avoided , use $this->t() instead in Workflow module

merge-requests/2419/head
Alex Pott 2020-02-25 09:27:25 +00:00
parent d384ad74af
commit 1ca32fdc84
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ class WorkflowEditForm extends EntityForm {
]; ];
if ($this->entity->access('delete-state:' . $state->id())) { if ($this->entity->access('delete-state:' . $state->id())) {
$links['delete'] = [ $links['delete'] = [
'title' => t('Delete'), 'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_state_form', [ 'url' => Url::fromRoute('entity.workflow.delete_state_form', [
'workflow' => $workflow->id(), 'workflow' => $workflow->id(),
'workflow_state' => $state->id(), 'workflow_state' => $state->id(),
@ -133,7 +133,7 @@ class WorkflowEditForm extends EntityForm {
'#weight' => $state->weight(), '#weight' => $state->weight(),
'weight' => [ 'weight' => [
'#type' => 'weight', '#type' => 'weight',
'#title' => t('Weight for @title', ['@title' => $state->label()]), '#title' => $this->t('Weight for @title', ['@title' => $state->label()]),
'#title_display' => 'invisible', '#title_display' => 'invisible',
'#default_value' => $state->weight(), '#default_value' => $state->weight(),
'#attributes' => ['class' => ['state-weight']], '#attributes' => ['class' => ['state-weight']],
@ -183,7 +183,7 @@ class WorkflowEditForm extends EntityForm {
'url' => Url::fromRoute('entity.workflow.edit_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]), 'url' => Url::fromRoute('entity.workflow.edit_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]),
]; ];
$links['delete'] = [ $links['delete'] = [
'title' => t('Delete'), 'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]), 'url' => Url::fromRoute('entity.workflow.delete_transition_form', ['workflow' => $workflow->id(), 'workflow_transition' => $transition->id()]),
]; ];
$form['transitions_container']['transitions'][$transition->id()] = [ $form['transitions_container']['transitions'][$transition->id()] = [
@ -192,7 +192,7 @@ class WorkflowEditForm extends EntityForm {
'#weight' => $transition->weight(), '#weight' => $transition->weight(),
'weight' => [ 'weight' => [
'#type' => 'weight', '#type' => 'weight',
'#title' => t('Weight for @title', ['@title' => $transition->label()]), '#title' => $this->t('Weight for @title', ['@title' => $transition->label()]),
'#title_display' => 'invisible', '#title_display' => 'invisible',
'#default_value' => $transition->weight(), '#default_value' => $transition->weight(),
'#attributes' => ['class' => ['transition-weight']], '#attributes' => ['class' => ['transition-weight']],

View File

@ -125,7 +125,7 @@ class WorkflowStateEditForm extends EntityForm {
]), ]),
]; ];
$links['delete'] = [ $links['delete'] = [
'title' => t('Delete'), 'title' => $this->t('Delete'),
'url' => Url::fromRoute('entity.workflow.delete_transition_form', [ 'url' => Url::fromRoute('entity.workflow.delete_transition_form', [
'workflow' => $workflow->id(), 'workflow' => $workflow->id(),
'workflow_transition' => $transition->id(), 'workflow_transition' => $transition->id(),