protected function revisionOverview(RevisionableInterface
$entity): array
{ $build['entity_revisions_table'
] =
[ '#theme' => 'table',
'#header' =>
[ 'revision' =>
['data' =>
$this->
t('Revision'
)],
'operations' =>
['data' =>
$this->
t('Operations'
)],
],
];
foreach ($this->
loadRevisions($entity) as $revision) { $build['entity_revisions_table'
]['#rows'
][$revision->
getRevisionId()] =
$this->
buildRow($revision);
} (new CacheableMetadata()) // Only dealing with this entity and no external dependencies.
->
addCacheableDependency($entity) ->
addCacheContexts(['languages:language_content'
]) ->
applyTo($build);
return $build;
}