protected static function RenderCachePlaceholder::generatePlaceholder in Render cache 7.2
Generates a render cache placeholder.
@codeCoverageIgnore
Parameters
string $callback: The #post_render_cache callback that will replace the placeholder with its eventual markup.
array $context: An array providing context for the #post_render_cache callback. This array will be altered to provide a 'token' key/value pair, if not already provided, to uniquely identify the generated placeholder.
Return value
string The generated placeholder HTML.
3 calls to RenderCachePlaceholder::generatePlaceholder()
- RenderCachePlaceholder::getPlaceholder in src/
Cache/ RenderCachePlaceholder.php - Gets a #post_render_cache placeholder for a given function.
- RenderCachePlaceholder::postRenderCacheCallback in src/
Cache/ RenderCachePlaceholder.php - Generic #post_render_cache callback for getPlaceholder().
- RenderCachePlaceholder::postRenderCacheMultiCallback in src/
Cache/ RenderCachePlaceholder.php - Generic #post_render_cache callback for getPlaceholder() with multi=TRUE.
1 method overrides RenderCachePlaceholder::generatePlaceholder()
- RenderCachePlaceholderMock::generatePlaceholder in tests/
src/ Cache/ RenderCachePlaceholderTest.php - Generates a render cache placeholder.
File
- src/
Cache/ RenderCachePlaceholder.php, line 148 - Contains \Drupal\render_cache\Cache\RenderCachePlaceholder
Class
- RenderCachePlaceholder
- Provides placeholder utility functions.
Namespace
Drupal\render_cache\CacheCode
protected static function generatePlaceholder($callback, array &$context) {
return drupal_render_cache_generate_placeholder($callback, $context);
}