public CacheableResponseTrait::getCacheableMetadata()
Returns the cacheability metadata for this response.
\Drupal\Core\Cache\CacheableMetadata
Overrides CacheableResponseInterface::getCacheableMetadata
public function getCacheableMetadata() { // A trait doesn't have a constructor, so initialize the cacheability // metadata if that hasn't happened yet. if (!isset($this->cacheabilityMetadata)) { $this->cacheabilityMetadata = new CacheableMetadata(); } return $this->cacheabilityMetadata; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!CacheableResponseTrait.php/function/CacheableResponseTrait::getCacheableMetadata/8.1.x