jsonapi_test_non_cacheable_methods.module in Drupal 10
Same filename and directory in other branches
Contains hook implementations for testing the JSON:API module.
File
core/modules/jsonapi/tests/modules/jsonapi_test_non_cacheable_methods/jsonapi_test_non_cacheable_methods.moduleView source
<?php
/**
* @file
* Contains hook implementations for testing the JSON:API module.
*
* @see: https://www.drupal.org/project/drupal/issues/3072076.
*/
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Url;
/**
* Implements hook_entity_presave().
*/
function jsonapi_test_non_cacheable_methods_entity_presave(EntityInterface $entity) {
Url::fromRoute('<front>')
->toString();
}
/**
* Implements hook_entity_predelete().
*/
function jsonapi_test_non_cacheable_methods_entity_predelete(EntityInterface $entity) {
Url::fromRoute('<front>')
->toString();
}
Functions
Name![]() |
Description |
---|---|
jsonapi_test_non_cacheable_methods_entity_predelete | Implements hook_entity_predelete(). |
jsonapi_test_non_cacheable_methods_entity_presave | Implements hook_entity_presave(). |