You are here

public function UserManager::__construct in Social API 3.x

Same name and namespace in other branches
  1. 8.2 src/User/UserManager.php \Drupal\social_api\User\UserManager::__construct()

Constructor.

Parameters

string $entity_type: The entity table.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Used for loading and creating Social API-related entities.

\Drupal\Core\Messenger\MessengerInterface $messenger: Used to display messages to user.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: Used for logging errors.

File

src/User/UserManager.php, line 61

Class

UserManager
Manages database related tasks.

Namespace

Drupal\social_api\User

Code

public function __construct($entity_type, EntityTypeManagerInterface $entity_type_manager, MessengerInterface $messenger, LoggerChannelFactoryInterface $logger_factory) {
  $this->entityType = $entity_type;
  $this->entityTypeManager = $entity_type_manager;
  $this->messenger = $messenger;
  $this->loggerFactory = $logger_factory;
}