You are here

class Embed in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/display/Embed.php \Drupal\views\Plugin\views\display\Embed
  2. 9 core/modules/views/src/Plugin/views/display/Embed.php \Drupal\views\Plugin\views\display\Embed

The plugin that handles an embed display.

@todo: Wait until annotations/plugins support access methods. no_ui => !\Drupal::config('views.settings')->get('ui.show.display_embed'),

Plugin annotation


@ViewsDisplay(
  id = "embed",
  title = @Translation("Embed"),
  help = @Translation("Provide a display which can be embedded using the views api."),
  theme = "views_view",
  uses_menu_links = FALSE
)

Hierarchy

  • class \Drupal\views\Plugin\views\display\Embed extends \Drupal\views\Plugin\views\display\DisplayPluginBase

Expanded class hierarchy of Embed

Related topics

File

core/modules/views/src/Plugin/views/display/Embed.php, line 21

Namespace

Drupal\views\Plugin\views\display
View source
class Embed extends DisplayPluginBase {

  /**
   * {@inheritdoc}
   */
  protected $usesAttachments = TRUE;

  /**
   * {@inheritdoc}
   */
  public function buildRenderable(array $args = [], $cache = TRUE) {
    $build = parent::buildRenderable($args, $cache);
    $build['#embed'] = TRUE;
    return $build;
  }

}

Members