You are here

protected function RecentKanbanActivities::calculateTimeAgo in Content Planner 8

Gets the time difference for the given log since the created time.

Parameters

\Drupal\content_kanban\Entity\KanbanLog $log: The Kanban log object.

Return value

mixed Returns the calculated time ago for the given Kanban log.

1 call to RecentKanbanActivities::calculateTimeAgo()
RecentKanbanActivities::composeMessage in modules/content_kanban/src/Plugin/DashboardBlock/RecentKanbanActivities.php
Composes the message.

File

modules/content_kanban/src/Plugin/DashboardBlock/RecentKanbanActivities.php, line 236

Class

RecentKanbanActivities
Provides a user block for Content Planner Dashboard.

Namespace

Drupal\content_kanban\Plugin\DashboardBlock

Code

protected function calculateTimeAgo(KanbanLog $log) {
  return $this->dateFormatter
    ->formatTimeDiffSince($log
    ->getCreatedTime());
}