AddTeamMember
in package
implements
AddsTeamMembers
Interfaces, Classes, Traits and Enums
- AddsTeamMembers
Table of Contents
- add() : void
- Add a new team member to the given team.
- ensureUserIsNotAlreadyOnTeam() : Closure
- Ensure that the user is not already on the team.
- rules() : array<string|int, mixed>
- Get the validation rules for adding a team member.
- validate() : void
- Validate the add member operation.
Methods
add()
Add a new team member to the given team.
public
add(mixed $user, mixed $team, string $email[, string|null $role = null ]) : void
Parameters
- $user : mixed
- $team : mixed
- $email : string
- $role : string|null = null
Return values
void —ensureUserIsNotAlreadyOnTeam()
Ensure that the user is not already on the team.
protected
ensureUserIsNotAlreadyOnTeam(mixed $team, string $email) : Closure
Parameters
- $team : mixed
- $email : string
Return values
Closure —rules()
Get the validation rules for adding a team member.
protected
rules() : array<string|int, mixed>
Return values
array<string|int, mixed> —validate()
Validate the add member operation.
protected
validate(mixed $team, string $email, string|null $role) : void
Parameters
- $team : mixed
- $email : string
- $role : string|null