$collected_responses[] =
static::
getAccessDeniedResponse($entity,
$field_access,
$via_link,
$field_name, 'The current user is not allowed to view this relationship.',
$field_name);
break;
} if ($target_entity =
$entity->
{$field_name}->entity
) { $target_access =
static::
entityAccess($target_entity, 'view',
$this->account
);
if (!
$target_access->
isAllowed()) { $target_access =
static::
entityAccess($target_entity, 'view label',
$this->account
)->
addCacheableDependency($target_access);
} if (!
$target_access->
isAllowed()) { $resource_identifier =
static::
toResourceIdentifier($target_entity);
if (!
static::
collectionHasResourceIdentifier($resource_identifier,
$data['already_checked'
])) { $data['already_checked'
][] =
$resource_identifier;
$via_link = Url::
fromRoute( sprintf('jsonapi.%s.individual',
$resource_identifier['type'
]),
['entity' =>
$resource_identifier['id'
]] );
$collected_responses[] =
static::
getAccessDeniedResponse($entity,
$target_access,
$via_link, NULL, NULL, '/data'
);
} break;
} } $psr_responses =
$this->
getResponses([static::
getRelatedLink(static::
toResourceIdentifier($entity),
$public_field_name)],
$request_options);