function VersionHistoryController::getRevisionDescriptionDateFormat

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php \Drupal\Core\Entity\Controller\VersionHistoryController::getRevisionDescriptionDateFormat()

Date format to use for revision description dates.

Parameters

\Drupal\Core\Entity\RevisionableInterface $revision: The revision in context.

Return value

array An array with keys 'type' and optionally 'format' suitable for passing to date formatter service.

1 call to VersionHistoryController::getRevisionDescriptionDateFormat()
VersionHistoryController::getRevisionDescription in core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php
Get a description of the revision.

File

core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php, line 191

Class

VersionHistoryController
Provides a controller showing revision history for an entity.

Namespace

Drupal\Core\Entity\Controller

Code

protected function getRevisionDescriptionDateFormat(RevisionableInterface $revision) : array {
    return [
        'type' => 'short',
        'format' => '',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.