PHP Interface Mpociot\Teamwork\Contracts\TeamworkUserInterface

Datei anzeigen Open project: mpociot/teamwork

Public Methods

Method Description
attachTeam ( mixed $team, array $pivotData = [] ) Alias to eloquent many-to-many relation's attach() method.
attachTeams ( mixed $teams ) Attach multiple teams to a user
currentTeam ( ) : Illuminate\Database\Eloquent\Relations\HasOne has-one relation with the current selected team model.
detachTeam ( mixed $team ) Alias to eloquent many-to-many relation's detach() method.
detachTeams ( mixed $teams ) Detach multiple teams from a user
invites ( ) : mixed One-to-Many relation with the invite model
isOwner ( ) : boolean Returns if the user owns a team
isOwnerOfTeam ( mixed $team ) : boolean Returns if the user owns the given team
switchTeam ( object | array | integer $team ) Switch the current team of the user
teams ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with the user model.

Method Details

attachTeam() public method

Alias to eloquent many-to-many relation's attach() method.
public attachTeam ( mixed $team, array $pivotData = [] )
$team mixed
$pivotData array

attachTeams() public method

Attach multiple teams to a user
public attachTeams ( mixed $teams )
$teams mixed

currentTeam() public method

has-one relation with the current selected team model.
public currentTeam ( ) : Illuminate\Database\Eloquent\Relations\HasOne
return Illuminate\Database\Eloquent\Relations\HasOne

detachTeam() public method

Alias to eloquent many-to-many relation's detach() method.
public detachTeam ( mixed $team )
$team mixed

detachTeams() public method

Detach multiple teams from a user
public detachTeams ( mixed $teams )
$teams mixed

invites() public method

One-to-Many relation with the invite model
public invites ( ) : mixed
return mixed

isOwner() public method

Returns if the user owns a team
public isOwner ( ) : boolean
return boolean

isOwnerOfTeam() public method

Returns if the user owns the given team
public isOwnerOfTeam ( mixed $team ) : boolean
$team mixed
return boolean

switchTeam() public method

Switch the current team of the user
public switchTeam ( object | array | integer $team )
$team object | array | integer

teams() public method

Many-to-Many relations with the user model.
public teams ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany