You are here

protected function EmbedViews::getAllViews in Views entity embed 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/EmbedType/EmbedViews.php \Drupal\views_entity_embed\Plugin\EmbedType\EmbedViews::getAllViews()

Methods get all views as options list.

1 call to EmbedViews::getAllViews()
EmbedViews::buildConfigurationForm in src/Plugin/EmbedType/EmbedViews.php

File

src/Plugin/EmbedType/EmbedViews.php, line 109

Class

EmbedViews
Viws embed type.

Namespace

Drupal\views_entity_embed\Plugin\EmbedType

Code

protected function getAllViews() {
  $views = [];
  foreach (Views::getAllViews() as $view) {
    if ($view
      ->enable()) {
      $views[$view
        ->id()] = $view
        ->label();
    }
  }
  return $views;
}