protected function getRelatableResourceTypesFromFieldDefinition(FieldDefinitionInterface
$field_definition, array
$resource_types) { $item_definition =
$field_definition->
getItemDefinition();
$entity_type_id =
$item_definition->
getSetting('target_type'
);
$handler_settings =
$item_definition->
getSetting('handler_settings'
);
$target_bundles =
empty($handler_settings['target_bundles'
]) ?
$this->
getAllBundlesForEntityType($entity_type_id) :
$handler_settings['target_bundles'
];
$relatable_resource_types =
[];
foreach ($target_bundles as $target_bundle) { if ($resource_type =
static::
lookupResourceType($resource_types,
$entity_type_id,
$target_bundle)) { $relatable_resource_types[] =
$resource_type;
} // Do not warn during the site installation since system integrity
// is not guaranteed in this period and the warnings may pop up falsy,
// adding confusion to the process.
elseif (!InstallerKernel::
installationAttempted()) { trigger_error(