public function PostPermissions::__construct in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
- 8.8 modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
- 10.3.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
- 10.1.x modules/social_features/social_post/src/Service/PostPermissions.php \Drupal\social_post\Service\PostPermissions::__construct()
- 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\ServiceCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, TranslationInterface $translation) {
$this->storage = $entity_type_manager
->getStorage('post_type');
$this
->setStringTranslation($translation);
}