You are here

public function GroupSubscribeForm::__construct in Organic groups 8

Constructs a GroupSubscribeForm.

@todo Set the `EntityRepositoryInterface` type hint on the second argument once Drupal 8.6.0 is released. It is currently omitted to preserve backwards compatibility with Drupal 8.5.x and earlier.

Parameters

\Drupal\og\OgAccessInterface $og_access: The OG access service.

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

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

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

Overrides ContentEntityForm::__construct

See also

https://github.com/Gizra/og/issues/397

File

src/Form/GroupSubscribeForm.php, line 53

Class

GroupSubscribeForm
Provides a form for subscribing to a group.

Namespace

Drupal\og\Form

Code

public function __construct(OgAccessInterface $og_access, EntityRepositoryInterface $entity_repository, ?EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, ?TimeInterface $time = NULL) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->ogAccess = $og_access;
}