You are here

public function PostPermissions::__construct in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
  2. 10.3.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
  3. 10.0.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
  4. 10.1.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
  5. 10.2.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()

PostPermissions constructor.

Parameters

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

\Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation service.

File

modules/social_features/social_post/src/Service/PostPermissions.php, line 31

Class

PostPermissions
Provides dynamic permissions for posts of different types.

Namespace

Drupal\social_post\Service

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, TranslationInterface $translation) {
  $this->storage = $entity_type_manager
    ->getStorage('post_type');
  $this
    ->setStringTranslation($translation);
}