Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
address
Commits
669c21af
Commit
669c21af
authored
May 30, 2019
by
git
Committed by
bojanz
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3037924
by nitin.ahire: Replace t() with $this->t() as a best practice
parent
b914f5ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/Plugin/Field/FieldType/AddressItem.php
src/Plugin/Field/FieldType/AddressItem.php
+3
-3
src/Plugin/views/filter/AdministrativeArea.php
src/Plugin/views/filter/AdministrativeArea.php
+6
-6
No files found.
src/Plugin/Field/FieldType/AddressItem.php
View file @
669c21af
...
...
@@ -195,9 +195,9 @@ class AddressItem extends FieldItemBase implements AddressInterface {
'override'
=>
[
'#type'
=>
'select'
,
'#options'
=>
[
FieldOverride
::
HIDDEN
=>
t
(
'Hidden'
),
FieldOverride
::
OPTIONAL
=>
t
(
'Optional'
),
FieldOverride
::
REQUIRED
=>
t
(
'Required'
),
FieldOverride
::
HIDDEN
=>
$this
->
t
(
'Hidden'
),
FieldOverride
::
OPTIONAL
=>
$this
->
t
(
'Optional'
),
FieldOverride
::
REQUIRED
=>
$this
->
t
(
'Required'
),
],
'#default_value'
=>
$override
,
'#empty_option'
=>
$this
->
t
(
'- No override -'
),
...
...
src/Plugin/views/filter/AdministrativeArea.php
View file @
669c21af
...
...
@@ -160,7 +160,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
if
(
!
empty
(
$argument_options
))
{
$form
[
'country'
][
'country_argument_id'
]
=
[
'#type'
=>
'select'
,
'#title'
=>
t
(
'Country contextual filter'
),
'#title'
=>
$this
->
t
(
'Country contextual filter'
),
'#options'
=>
$argument_options
,
'#default_value'
=>
$this
->
options
[
'country'
][
'country_argument_id'
],
];
...
...
@@ -172,7 +172,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
];
$form
[
'country'
][
'country_argument_id'
][
'error'
]
=
[
'#type'
=>
'markup'
,
'#markup'
=>
t
(
'You must add a contextual filter for the country code to use this filter for administrative areas.'
),
'#markup'
=>
$this
->
t
(
'You must add a contextual filter for the country code to use this filter for administrative areas.'
),
];
}
$form
[
'country'
][
'country_argument_id'
][
'#states'
]
=
[
...
...
@@ -192,7 +192,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
if
(
!
empty
(
$filter_options
))
{
$form
[
'country'
][
'country_filter_id'
]
=
[
'#type'
=>
'select'
,
'#title'
=>
t
(
'Exposed country filter to determine values'
),
'#title'
=>
$this
->
t
(
'Exposed country filter to determine values'
),
'#options'
=>
$filter_options
,
'#default_value'
=>
$this
->
options
[
'country'
][
'country_filter_id'
],
];
...
...
@@ -204,7 +204,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
];
$form
[
'country'
][
'country_filter_id'
][
'error'
]
=
[
'#type'
=>
'markup'
,
'#markup'
=>
t
(
'You must add a filter for the country code to use this filter for administrative areas.'
),
'#markup'
=>
$this
->
t
(
'You must add a filter for the country code to use this filter for administrative areas.'
),
];
}
$form
[
'country'
][
'country_filter_id'
][
'#states'
]
=
[
...
...
@@ -217,7 +217,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
$form
[
'country'
][
'country_static_code'
]
=
[
'#type'
=>
'select'
,
'#title'
=>
t
(
'Predefined country for administrative areas'
),
'#title'
=>
$this
->
t
(
'Predefined country for administrative areas'
),
'#options'
=>
$countries
,
'#empty_value'
=>
''
,
'#default_value'
=>
$this
->
options
[
'country'
][
'country_static_code'
],
...
...
@@ -377,7 +377,7 @@ class AdministrativeArea extends CountryAwareInOperatorBase {
];
$form
[
'value'
][
'message'
]
=
[
'#type'
=>
'markup'
,
'#markup'
=>
t
(
"You can only select options here if you use a predefined country for the 'Country source'."
),
'#markup'
=>
$this
->
t
(
"You can only select options here if you use a predefined country for the 'Country source'."
),
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment