You are here

public function SocialGroupContentListBuilder::__construct in Open Social 8

Same name and namespace in other branches
  1. 8.2 modules/social_features/social_group/src/Controller/SocialGroupContentListBuilder.php \Drupal\social_group\Controller\SocialGroupContentListBuilder::__construct()
  2. 8.3 modules/social_features/social_group/src/Controller/SocialGroupContentListBuilder.php \Drupal\social_group\Controller\SocialGroupContentListBuilder::__construct()
  3. 8.4 modules/social_features/social_group/src/Controller/SocialGroupContentListBuilder.php \Drupal\social_group\Controller\SocialGroupContentListBuilder::__construct()

Constructs a new GroupContentListBuilder object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination: The redirect destination.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

Overrides EntityListBuilder::__construct

File

modules/social_features/social_group/src/Controller/SocialGroupContentListBuilder.php, line 53

Class

SocialGroupContentListBuilder
Provides a list controller for group content from GroupContentListBuilder.

Namespace

Drupal\social_group\Controller

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, RedirectDestinationInterface $redirect_destination, RouteMatchInterface $route_match, EntityTypeInterface $entity_type) {
  parent::__construct($entity_type, $entity_type_manager
    ->getStorage($entity_type
    ->id()));
  $this->entityTypeManager = $entity_type_manager;
  $this->redirectDestination = $redirect_destination;

  // There should always be a group on the route for group content lists.
  $this->group = $route_match
    ->getParameters()
    ->get('group');
}