fixed deprecated functions

This commit is contained in:
2022-04-03 14:51:38 +01:00
parent 225e92a51c
commit 13ddf5aa13
5 changed files with 29 additions and 21 deletions

View File

@ -118,10 +118,11 @@ class OCOrganisationController extends ControllerBase implements ContainerInject
// Use revision link to link to revisions that are not active.
$date = $this->dateFormatter->format($revision->getRevisionCreationTime(), 'short');
if ($vid != $oc_organisation->getRevisionId()) {
$link = $this->l($date, new Url('entity.oc_organisation.revision', [
$url = new Url('entity.oc_organisation.revision', [
'oc_organisation' => $oc_organisation->id(),
'oc_organisation_revision' => $vid,
]));
]);
$link = \Drupal\Core\Link::fromTextAndUrl($date,$url)->toString();
}
else {
$link = $oc_organisation->toLink($date)->toString();