public function ConfigEntityRevisionsDeleteFormBase::__construct in Config Entity Revisions 8
Same name and namespace in other branches
- 8.2 src/ConfigEntityRevisionsDeleteFormBase.php \Drupal\config_entity_revisions\ConfigEntityRevisionsDeleteFormBase::__construct()
- 1.x src/ConfigEntityRevisionsDeleteFormBase.php \Drupal\config_entity_revisions\ConfigEntityRevisionsDeleteFormBase::__construct()
Constructs a new ConfigEntityRevisionsRevisionDeleteForm.
Parameters
EntityStorageInterface $storage: The ConfigEntityRevisions storage.
Connection $connection: The database connection.
DateFormatter $dateFormatter: The date formatter service.
ConfigEntityRevisionsControllerInterface: The controller interface.
File
- src/ConfigEntityRevisionsDeleteFormBase.php, line 75 
Class
- ConfigEntityRevisionsDeleteFormBase
- Provides a form for reverting a config entity revision.
Namespace
Drupal\config_entity_revisionsCode
public function __construct(EntityStorageInterface $storage, Connection $connection, $dateFormatter, ConfigEntityRevisionsControllerInterface $controller) {
  $this->connection = $connection;
  $this->dateFormatter = $dateFormatter;
  $match = \Drupal::service('router')
    ->matchRequest(\Drupal::request());
  $this->config_entity = $match['config_entity']
    ->revisioned_entity();
  $this->configEntityRevisionsStorage = $storage;
  $this->revision = $storage
    ->loadRevision($match['revision_id']);
  $this->controller = $controller;
}