/** * {@inheritdoc} */ public function formatDurationAttribute(tubepress_api_media_MediaItem $item, $sourceAttributeName, $destinationAttributeName) { if (!$item->hasAttribute($sourceAttributeName)) { return; } $seconds = $item->getAttribute($sourceAttributeName); $formatted = $this->_timeUtils->secondsToHumanTime($seconds); $item->setAttribute($destinationAttributeName, $formatted); }