function ResourceObjectNormalizationCacher::onTerminate
Writes normalizations of entities to cache, if any were created.
Parameters
\Symfony\Component\HttpKernel\Event\TerminateEvent $event: The Event to process.
File
- 
              core/
modules/ jsonapi/ src/ EventSubscriber/ ResourceObjectNormalizationCacher.php, line 167  
Class
- ResourceObjectNormalizationCacher
 - Caches entity normalizations after the response has been sent.
 
Namespace
Drupal\jsonapi\EventSubscriberCode
public function onTerminate(TerminateEvent $event) {
  foreach ($this->toCache as $value) {
    [$object, $normalization_parts] = $value;
    $this->set($object, $normalization_parts);
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.