Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_dashboard
Commits
373b1aca
Commit
373b1aca
authored
Nov 27, 2020
by
Liam Morland
Browse files
Coding standards: Use StringTranslationTrait for translation
parent
a34ff16a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Plugin/Block/ContentListBlock.php
View file @
373b1aca
...
...
@@ -101,7 +101,7 @@ class ContentListBlock extends BlockBase {
// Get the rendered title for the view.
$the_title_render_array
=
[
'#markup'
=>
t
(
'@title'
,
[
'@title'
=>
$title
]),
'#markup'
=>
$this
->
t
(
'@title'
,
[
'@title'
=>
$title
]),
'#allowed_tags'
=>
[
'h2'
],
];
...
...
@@ -163,11 +163,11 @@ class ContentListBlock extends BlockBase {
'#type'
=>
'select'
,
'#title'
=>
$this
->
t
(
'Sort by'
),
'#options'
=>
[
'title'
=>
'Title'
,
'type'
=>
'Content type'
,
'uid'
=>
'Author'
,
'revision_uid'
=>
'Last update by'
,
'changed'
=>
'Last updated'
,
'title'
=>
$this
->
t
(
'Title'
)
,
'type'
=>
$this
->
t
(
'Content type'
)
,
'uid'
=>
$this
->
t
(
'Author'
)
,
'revision_uid'
=>
$this
->
t
(
'Last update by'
)
,
'changed'
=>
$this
->
t
(
'Last updated'
)
,
],
'#default_value'
=>
isset
(
$this
->
configuration
[
'sort_by'
])
?
$this
->
configuration
[
'sort_by'
]
:
'last_updated'
,
];
...
...
@@ -177,8 +177,8 @@ class ContentListBlock extends BlockBase {
'#type'
=>
'select'
,
'#title'
=>
$this
->
t
(
'Sort order'
),
'#options'
=>
[
'asc'
=>
'Ascending'
,
'desc'
=>
'Descending'
,
'asc'
=>
$this
->
t
(
'Ascending'
)
,
'desc'
=>
$this
->
t
(
'Descending'
)
,
],
'#default_value'
=>
isset
(
$this
->
configuration
[
'sort_order'
])
?
$this
->
configuration
[
'sort_order'
]
:
'asc'
,
];
...
...
src/Plugin/Block/ContentManagementMenuBlock.php
View file @
373b1aca
...
...
@@ -93,7 +93,7 @@ class ContentManagementMenuBlock extends BlockBase implements ContainerFactoryPl
];
$build
[
$id
][
'table'
][
$sec_id
][
'operations'
][
'#links'
][
'add'
]
=
[
'title'
=>
t
(
'Add'
),
'title'
=>
$this
->
t
(
'Add'
),
'url'
=>
$item
->
link
->
getUrlObject
(),
];
...
...
src/Plugin/Block/FormsListBlock.php
View file @
373b1aca
...
...
@@ -55,7 +55,7 @@ class FormsListBlock extends BlockBase {
// Get the rendered title for the view.
$the_title_render_array
=
[
'#markup'
=>
t
(
'@title'
,
[
'@title'
=>
$title
]),
'#markup'
=>
$this
->
t
(
'@title'
,
[
'@title'
=>
$title
]),
'#allowed_tags'
=>
[
'h2'
],
];
...
...
Write
Preview
Supports
Markdown
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