public function TeamMembersList::__construct in Apigee Edge 8
TeamMembersList constructor.
Parameters
\Drupal\apigee_edge_teams\TeamMembershipManagerInterface $team_membership_manager: The team membership manager service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Extension\ModuleHandlerInterface|null $module_handler: The module handler.
File
- modules/
apigee_edge_teams/ src/ Controller/ TeamMembersList.php, line 72
Class
- TeamMembersList
- Team members list builder for a team.
Namespace
Drupal\apigee_edge_teams\ControllerCode
public function __construct(TeamMembershipManagerInterface $team_membership_manager, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler = NULL) {
if (!$module_handler) {
@trigger_error('Calling ' . __METHOD__ . ' without the $module_handler is deprecated in apigee_edge:8-x-1.19 and is required before apigee_edge:8.x-2.0. See https://github.com/apigee/apigee-edge-drupal/pull/518.', E_USER_DEPRECATED);
$module_handler = \Drupal::moduleHandler();
}
$this->teamMembershipManager = $team_membership_manager;
$this->entityTypeManager = $entity_type_manager;
if ($role = $this
->entityTypeManager()
->getStorage('team_role')
->load(TeamRoleInterface::TEAM_MEMBER_ROLE)) {
$this->defaultRoles = [
$role
->id() => $role
->label(),
];
}
$this->moduleHandler = $module_handler;
}