You are here

public function MediaRevisionController::__construct in Media Revisions UI 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/MediaRevisionController.php \Drupal\media_revisions_ui\Controller\MediaRevisionController::__construct()

Constructs a MediaRevisionController object.

Parameters

\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

File

src/Controller/MediaRevisionController.php, line 53

Class

MediaRevisionController
Provides a list of media revisions for a given media.

Namespace

Drupal\media_revisions_ui\Controller

Code

public function __construct(DateFormatterInterface $date_formatter, RendererInterface $renderer, EntityRepositoryInterface $entity_repository = NULL) {
  $this->dateFormatter = $date_formatter;
  $this->renderer = $renderer;
  $this->entityRepository = $entity_repository;
}