Version 1
[yaffs-website] / web / core / modules / views / src / Plugin / views / display / Embed.php
1 <?php
2
3 namespace Drupal\views\Plugin\views\display;
4
5 /**
6  * The plugin that handles an embed display.
7  *
8  * @ingroup views_display_plugins
9  *
10  * @todo: Wait until annotations/plugins support access methods.
11  * no_ui => !\Drupal::config('views.settings')->get('ui.show.display_embed'),
12  *
13  * @ViewsDisplay(
14  *   id = "embed",
15  *   title = @Translation("Embed"),
16  *   help = @Translation("Provide a display which can be embedded using the views api."),
17  *   theme = "views_view",
18  *   uses_menu_links = FALSE
19  * )
20  */
21 class Embed extends DisplayPluginBase {
22
23   /**
24    * {@inheritdoc}
25    */
26   public function buildRenderable(array $args = [], $cache = TRUE) {
27     $build = parent::buildRenderable($args, $cache);
28     $build['#embed'] = TRUE;
29     return $build;
30   }
31
32 }