protected function authorizeRelationship(AuthorizerInterface $authorizer, $request, $record, string $field): void
    {
        if ($this->isModifyRelationship($request)) {
            $authorizer->modifyRelationship($record, $field, $request);
            return;
        }

        $authorizer->readRelationship($record, $field, $request);
    }
protected function authorizeRelationship(AuthorizerInterface $authorizer, $request, $record, string $field): void
    {
        if ($this->isModifyRelationship($request)) {
            $authorizer->modifyRelationship($record, $field, $request);
            return;
        }

        $authorizer->readRelationship($record, $field, $request);
    }
protected function authorizeRelationship ( AuthorizerInterface $ authorizer , $ request , $ record , string $ field ) : void { if ( $ this -> isModifyRelationship ( $ request ) ) { $ authorizer -> modifyRelationship ( $ record , $ field , $ request ) ; return ; } $ authorizer -> readRelationship ( $ record , $ field , $ request ) ; }
Authorize a relationship request.

@param AuthorizerInterface $authorizer
@param $request
@param $record
@param string $field
@throws AuthenticationException
@throws AuthorizationException
Authorize a relationship request .