You are here

public function PreviewLinkForm::__construct in Preview Link 8

PreviewLinkForm constructor.

Parameters

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

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

\Drupal\preview_link\LinkExpiry $link_expiry: Calculates link expiry time.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

Overrides ContentEntityForm::__construct

File

src/Form/PreviewLinkForm.php, line 53

Class

PreviewLinkForm
Preview link form.

Namespace

Drupal\preview_link\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, DateFormatterInterface $date_formatter, LinkExpiry $link_expiry, MessengerInterface $messenger) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->dateFormatter = $date_formatter;
  $this->linkExpiry = $link_expiry;
  $this->messenger = $messenger;
}