public static function WeMegaMenuBuilder::renderView in Drupal Mega Menu 8
Same name and namespace in other branches
- 8.x src/WeMegaMenuBuilder.php \Drupal\we_megamenu\WeMegaMenuBuilder::renderView()
Render all drupal view.
File
- src/
WeMegaMenuBuilder.php, line 735
Class
Namespace
Drupal\we_megamenuCode
public static function renderView() {
$entity_manager = Drupal::entityTypeManager();
$views = $entity_manager
->getStorage('view')
->loadMultiple();
foreach ($views as $key => $view) {
$view = Views::getView($key);
$a = $view
->render();
if ($a) {
echo \Drupal::service('renderer')
->render($view);
exit;
}
}
}