You are here

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

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

SocialPostListBuilder constructor.

Parameters

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

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage for the social_post entity.

\Drupal\Core\Entity\EntityStorageInterface $user_entity: The entity storage for the user entity.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator.

Overrides EntityListBuilder::__construct

File

src/Entity/Controller/SocialPostListBuilder.php, line 66

Class

SocialPostListBuilder
Defines a class to build a listing of Social Post Entities.

Namespace

Drupal\social_post\Entity\Controller

Code

public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EntityStorageInterface $user_entity, UrlGeneratorInterface $url_generator) {
  parent::__construct($entity_type, $storage);
  $this->urlGenerator = $url_generator;
  $this->userEntity = $user_entity;
}