Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Drupal\aggregator\Controller;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Utility\Xss;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\Core\Datetime\DateFormatter;
|
||||
use Drupal\aggregator\FeedInterface;
|
||||
|
|
@ -127,8 +127,18 @@ class AggregatorController extends ControllerBase {
|
|||
$row[] = $this->formatPlural($entity_manager->getStorage('aggregator_item')->getItemCount($feed), '1 item', '@count items');
|
||||
$last_checked = $feed->getLastCheckedTime();
|
||||
$refresh_rate = $feed->getRefreshRate();
|
||||
$row[] = ($last_checked ? $this->t('@time ago', array('@time' => $this->dateFormatter->formatTimeDiffSince($last_checked))) : $this->t('never'));
|
||||
$row[] = ($last_checked && $refresh_rate ? $this->t('@time left', array('@time' => $this->dateFormatter->formatTimeDiffUntil($last_checked + $refresh_rate))) : $this->t('never'));
|
||||
|
||||
$row[] = ($last_checked ? $this->t('@time ago', array('@time' => $this->dateFormatter->formatInterval(REQUEST_TIME - $last_checked))) : $this->t('never'));
|
||||
if (!$last_checked && $refresh_rate) {
|
||||
$next_update = $this->t('imminently');
|
||||
}
|
||||
elseif ($last_checked && $refresh_rate) {
|
||||
$next_update = $next = $this->t('%time left', array('%time' => $this->dateFormatter->formatInterval($last_checked + $refresh_rate - REQUEST_TIME)));
|
||||
}
|
||||
else {
|
||||
$next_update = $this->t('never');
|
||||
}
|
||||
$row[] = $next_update;
|
||||
$links['edit'] = [
|
||||
'title' => $this->t('Edit'),
|
||||
'url' => Url::fromRoute('entity.aggregator_feed.edit_form', ['aggregator_feed' => $feed->id()]),
|
||||
|
|
@ -183,11 +193,11 @@ class AggregatorController extends ControllerBase {
|
|||
* @param \Drupal\aggregator\FeedInterface $aggregator_feed
|
||||
* The aggregator feed.
|
||||
*
|
||||
* @return string
|
||||
* The feed label.
|
||||
* @return array
|
||||
* The feed label as a render array.
|
||||
*/
|
||||
public function feedTitle(FeedInterface $aggregator_feed) {
|
||||
return SafeMarkup::xssFilter($aggregator_feed->label());
|
||||
return ['#markup' => $aggregator_feed->label(), '#allowed_tags' => Xss::getHtmlTagList()];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue