jsonapi_test_non_cacheable_methods.module
Same filename in other branches
Contains hook implementations for testing the JSON:API module.
@see: https://www.drupal.org/project/drupal/issues/3072076.
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_non_cacheable_methods/ jsonapi_test_non_cacheable_methods.module
View 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
Title | Deprecated | Summary |
---|---|---|
jsonapi_test_non_cacheable_methods_entity_predelete | Implements hook_entity_predelete(). | |
jsonapi_test_non_cacheable_methods_entity_presave | Implements hook_entity_presave(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.