PHP 트레잇 Silber\Bouncer\Conductors\Traits\DisassociatesAbilities

파일 보기 프로젝트 열기: JosephSilber/bouncer

공개 메소드들

메소드 설명
to ( mixed $abilities, Model | string | null $entity = null, array $attributes = [] ) : boolean Remove the given ability from the model.

보호된 메소드들

메소드 설명
detachAbilitiesWithPivotConstraints ( Model $model, array $ids, array $constraints ) : void Detach the given IDs from the model, with the given pivot constraints.
filterNumericAbilities ( array $abilities ) : array Filter the provided abilities to the ones that are numeric.
getAbilityIds ( mixed $abilities, Model | string | null $model, array $attributes ) : array Get the IDs of the provided abilities.
getAbilityIdsFromModels ( array $abilities ) : array Get the Ability IDs from the models present in the given array.
getAbilityIdsFromStrings ( array $abilities ) : array Get the ability IDs from the names present in the given array.
getModel ( ) : Model | null Get the model from which to disassociate the abilities.
getModelAbilityId ( string $ability, Model | string $model, array $attributes ) : integer | null Get the ability ID for the given model.

메소드 상세

detachAbilitiesWithPivotConstraints() 보호된 메소드

Detach the given IDs from the model, with the given pivot constraints.
protected detachAbilitiesWithPivotConstraints ( Model $model, array $ids, array $constraints ) : void
$model Illuminate\Database\Eloquent\Model
$ids array
$constraints array
리턴 void

filterNumericAbilities() 보호된 메소드

Filter the provided abilities to the ones that are numeric.
protected filterNumericAbilities ( array $abilities ) : array
$abilities array
리턴 array

getAbilityIds() 보호된 메소드

Get the IDs of the provided abilities.
protected getAbilityIds ( mixed $abilities, Model | string | null $model, array $attributes ) : array
$abilities mixed
$model Illuminate\Database\Eloquent\Model | string | null
$attributes array
리턴 array

getAbilityIdsFromModels() 보호된 메소드

Get the Ability IDs from the models present in the given array.
protected getAbilityIdsFromModels ( array $abilities ) : array
$abilities array
리턴 array

getAbilityIdsFromStrings() 보호된 메소드

Get the ability IDs from the names present in the given array.
protected getAbilityIdsFromStrings ( array $abilities ) : array
$abilities array
리턴 array

getModel() 보호된 메소드

Get the model from which to disassociate the abilities.
protected getModel ( ) : Model | null
리턴 Illuminate\Database\Eloquent\Model | null

getModelAbilityId() 보호된 메소드

Get the ability ID for the given model.
protected getModelAbilityId ( string $ability, Model | string $model, array $attributes ) : integer | null
$ability string
$model Illuminate\Database\Eloquent\Model | string
$attributes array
리턴 integer | null

to() 공개 메소드

Remove the given ability from the model.
public to ( mixed $abilities, Model | string | null $entity = null, array $attributes = [] ) : boolean
$abilities mixed
$entity Illuminate\Database\Eloquent\Model | string | null
$attributes array
리턴 boolean