You are here

ViewRevisionsController.php in Config Entity Revisions 8.2

File

modules/view_revisions/src/Controller/ViewRevisionsController.php
View source
<?php

namespace Drupal\view_revisions\Controller;

use Drupal\config_entity_revisions\ConfigEntityRevisionsControllerBase;
use Drupal\config_entity_revisions\ConfigEntityRevisionsControllerInterface;
use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Controller to make library functions available to various consumers.
 */
class ViewRevisionsController extends ConfigEntityRevisionsControllerBase implements ConfigEntityRevisionsControllerInterface {

  /**
   * Generates a title for the revision.
   *
   * This function is needed because the $Views parameter needs to match
   * the route but the parent's parameter is named $configEntity.
   *
   * @inheritdoc
   */
  public function revisionShowTitle(ConfigEntityInterface $view) {
    return '"' . $view
      ->label() . '" view, revision ' . $view
      ->getRevisionId();
  }

}

Classes

Namesort descending Description
ViewRevisionsController Controller to make library functions available to various consumers.