Loading jsonapi.module +1 −3 Original line number Diff line number Diff line Loading @@ -60,13 +60,11 @@ function jsonapi_entity_base_field_info(EntityTypeInterface $entity_type) { /** * Implements hook_entity_base_field_info(). * * @todo Remove when https://www.drupal.org/project/drupal/issues/2977882 lands. */ function jsonapi_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { $fields = []; if ($entity_type->id() == 'taxonomy_term') { if (floatval(\Drupal::VERSION) < 8.6 && $entity_type->id() == 'taxonomy_term') { // Only terms in the same bundle can be a parent. $fields['parent'] = clone $base_field_definitions['parent']; $fields['parent']->setSetting('handler_settings', ['target_bundles' => [$bundle]]); Loading Loading
jsonapi.module +1 −3 Original line number Diff line number Diff line Loading @@ -60,13 +60,11 @@ function jsonapi_entity_base_field_info(EntityTypeInterface $entity_type) { /** * Implements hook_entity_base_field_info(). * * @todo Remove when https://www.drupal.org/project/drupal/issues/2977882 lands. */ function jsonapi_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) { $fields = []; if ($entity_type->id() == 'taxonomy_term') { if (floatval(\Drupal::VERSION) < 8.6 && $entity_type->id() == 'taxonomy_term') { // Only terms in the same bundle can be a parent. $fields['parent'] = clone $base_field_definitions['parent']; $fields['parent']->setSetting('handler_settings', ['target_bundles' => [$bundle]]); Loading