function DisplayPluginBase::buildBasicRenderable
Overrides DisplayPluginInterface::buildBasicRenderable
4 calls to DisplayPluginBase::buildBasicRenderable()
- Feed::buildResponse in core/
modules/ views/ src/ Plugin/ views/ display/ Feed.php - Builds up a response with the rendered view as content.
- Page::buildBasicRenderable in core/
modules/ views/ src/ Plugin/ views/ display/ Page.php - Builds a basic render array which can be properly render cached.
- Page::buildBasicRenderable in core/
modules/ views/ src/ Plugin/ views/ display/ Page.php - Builds a basic render array which can be properly render cached.
- RestExport::buildResponse in core/
modules/ rest/ src/ Plugin/ views/ display/ RestExport.php - Builds up a response with the rendered view as content.
1 method overrides DisplayPluginBase::buildBasicRenderable()
- Page::buildBasicRenderable in core/
modules/ views/ src/ Plugin/ views/ display/ Page.php - Builds a basic render array which can be properly render cached.
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 2466
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
public static function buildBasicRenderable($view_id, $display_id, array $args = []) {
$build = [
'#type' => 'view',
'#name' => $view_id,
'#display_id' => $display_id,
'#arguments' => $args,
'#embed' => FALSE,
'#cache' => [
'keys' => [
'view',
$view_id,
'display',
$display_id,
],
],
];
if ($args) {
$build['#cache']['keys'][] = 'args';
$build['#cache']['keys'][] = implode(',', $args);
}
$build['#cache_properties'] = [
'#view_id',
'#view_display_show_admin_links',
'#view_display_plugin_id',
];
return $build;
}