You are here

public function DataPolicy::revisionOverviewTitle in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  2. 8.2 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  3. 8.3 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  4. 8.4 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  5. 8.5 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  6. 8.6 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  7. 8.7 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  8. 10.0.x modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()
  9. 10.1.x modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::revisionOverviewTitle()

Page title callback for a Data policy revision.

Parameters

int $data_policy_revision: The Data policy revision ID.

Return value

string The page title.

Overrides DataPolicy::revisionOverviewTitle

1 string reference to 'DataPolicy::revisionOverviewTitle'
social_gdpr.routing.yml in modules/custom/social_gdpr/social_gdpr.routing.yml
modules/custom/social_gdpr/social_gdpr.routing.yml

File

modules/custom/social_gdpr/src/Controller/DataPolicy.php, line 33

Class

DataPolicy
Class DataPolicy.

Namespace

Drupal\social_gdpr\Controller

Code

public function revisionOverviewTitle($data_policy_revision) {

  /** @var \Drupal\data_policy\Entity\DataPolicyInterface $data_policy */
  $data_policy = $this
    ->entityTypeManager()
    ->getStorage('data_policy')
    ->loadRevision($data_policy_revision);
  return $this
    ->t('Revision from %date', [
    '%date' => $this
      ->dateFormatter()
      ->format($data_policy
      ->getRevisionCreationTime()),
  ]);
}