Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
61e09de0
Commit
61e09de0
authored
Feb 18, 2015
by
Alex Pott
Browse files
Issue
#1763964
by ParisLiakos, mrded: Use #type => link for theme_aggregator_block_item()
parent
7b3189de
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/modules/aggregator/aggregator.module
View file @
61e09de0
...
...
@@ -66,10 +66,6 @@ function aggregator_theme() {
'render element'
=>
'elements'
,
'file'
=>
'aggregator.theme.inc'
,
),
'aggregator_block_item'
=>
array
(
'variables'
=>
array
(
'item'
=>
NULL
,
'feed'
=>
0
),
'file'
=>
'aggregator.theme.inc'
,
),
'aggregator_item'
=>
array
(
'render element'
=>
'elements'
,
'file'
=>
'aggregator.theme.inc'
,
...
...
core/modules/aggregator/aggregator.theme.inc
View file @
61e09de0
...
...
@@ -48,20 +48,3 @@ function template_preprocess_aggregator_feed(&$variables) {
$variables
[
'full'
]
=
$variables
[
'elements'
][
'#view_mode'
]
==
'full'
;
$variables
[
'title'
]
=
String
::
checkPlain
(
$feed
->
label
());
}
/**
* Prepares variables for individual feed item block templates.
*
* Default template: aggregator-block-item.html.twig.
*
* @param array $variables
* An associative array containing:
* - item: The item to be displayed.
* - feed: Not used.
*/
function
template_preprocess_aggregator_block_item
(
&
$variables
)
{
// Display the external link to the item.
$item
=
$variables
[
'item'
];
$variables
[
'url'
]
=
check_url
(
$item
->
getLink
());
$variables
[
'title'
]
=
String
::
checkPlain
(
$item
->
label
());
}
core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php
View file @
61e09de0
...
...
@@ -171,8 +171,9 @@ public function build() {
$rendered_items
=
array
();
foreach
(
$items
as
$item
)
{
$aggregator_block_item
=
array
(
'#theme'
=>
'aggregator_block_item'
,
'#item'
=>
$item
,
'#type'
=>
'link'
,
'#href'
=>
$item
->
getLink
(),
'#title'
=>
$item
->
label
(),
);
$rendered_items
[]
=
drupal_render
(
$aggregator_block_item
);
}
...
...
core/modules/aggregator/templates/aggregator-block-item.html.twig
deleted
100644 → 0
View file @
7b3189de
{#
/**
* @file
* Default theme implementation for feed item for display in the block.
*
* Available variables:
* - url: URL to the feed item.
* - title: Title of the feed item.
*
* @see template_preprocess_aggregator_block_item()
*
* @ingroup themeable
*/
#}
<a
href=
"
{{
url
}}
"
>
{{
title
}}
</a>
core/themes/classy/templates/aggregator/aggregator-block-item.html.twig
deleted
100644 → 0
View file @
7b3189de
{#
/**
* @file
* Default theme implementation for feed item for display in the block.
*
* Available variables:
* - url: URL to the feed item.
* - title: Title of the feed item.
*
* @see template_preprocess_aggregator_block_item()
*
* @ingroup themeable
*/
#}
<a
href=
"
{{
url
}}
"
>
{{
title
}}
</a>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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