Unverified Commit 9df13e03 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3252872 by bbrala, gabesullice, bradjones1, alexpott: Use...

Issue #3252872 by bbrala, gabesullice, bradjones1, alexpott: Use CacheableSupportsMethodInterface for performance improvement in jsonapi normalizers
parent 67b083bf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -269,4 +269,11 @@ protected function getTypedDataIds($types, $context = []) {
    return $typed_data_ids;
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod(): bool {
    return TRUE;
  }

}
+7 −0
Original line number Diff line number Diff line
@@ -184,4 +184,11 @@ public function getUuid($data) {
    }
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod(): bool {
    return TRUE;
  }

}
+7 −0
Original line number Diff line number Diff line
@@ -125,4 +125,11 @@ protected function createTranslatedInstance(FieldItemInterface $item, $langcode)
    return $entity_translation->get($field_name)->appendItem();
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod(): bool {
    return TRUE;
  }

}
+7 −0
Original line number Diff line number Diff line
@@ -71,4 +71,11 @@ protected function normalizeFieldItems($field_items, $format, $context) {
    return $normalized_field_items;
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod(): bool {
    return TRUE;
  }

}
+7 −0
Original line number Diff line number Diff line
@@ -74,4 +74,11 @@ protected function getEntityUri(EntityInterface $entity, array $context = []) {
    return $entity->createFileUrl(FALSE);
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod(): bool {
    return TRUE;
  }

}
Loading