You are here

public function SocialPostEntityDeleteForm::__construct in Social Post 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/SocialPostEntityDeleteForm.php \Drupal\social_post\Form\SocialPostEntityDeleteForm::__construct()

SocialPostUserEntityDeleteForm constructor.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity type manager.

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

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

\Drupal\Core\Routing\CurrentRouteMatch $route_match: The current route match.

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

Overrides ContentEntityForm::__construct

File

src/Form/SocialPostEntityDeleteForm.php, line 77

Class

SocialPostEntityDeleteForm
Provides a form for deleting Social Post user entities.

Namespace

Drupal\social_post\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, CurrentRouteMatch $route_match, MessengerInterface $messenger) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->routeMatch = $route_match;
  $this->messenger = $messenger;
  $this->uid = $this->routeMatch
    ->getParameter('user');
  $this->provider = $this->routeMatch
    ->getParameter('provider');
}