protected static function Formatter::cacheFragments in RESTful 7.2
Gets a cache fragments based on the data to be rendered.
Parameters
mixed $data: The data to be rendered.
Return value
\Doctrine\Common\Collections\ArrayCollection;
The cache controller.
2 calls to Formatter::cacheFragments()
- Formatter::createCacheController in src/
Plugin/ formatter/ Formatter.php - Gets a cache controller based on the data to be rendered.
- Formatter::setCachedData in src/
Plugin/ formatter/ Formatter.php - Gets the cached computed value for the fields to be rendered.
File
- src/
Plugin/ formatter/ Formatter.php, line 245 - Contains \Drupal\restful\Plugin\formatter\Formatter
Class
- Formatter
- Class Formatter.
Namespace
Drupal\restful\Plugin\formatterCode
protected static function cacheFragments($data) {
$context = $data
->getContext();
if (!($cache_fragments = $context['cache_fragments'])) {
return NULL;
}
return $cache_fragments;
}