You are here

public function ViewPrintController::viewPrintDebug in Entity Print 8.2

Print the debug output.

Parameters

string $export_type: The export type machine name.

string $view_name: The machine name of the view.

string $display_id: The machine name of the display.

Return value

\Symfony\Component\HttpFoundation\Response The response object.

1 string reference to 'ViewPrintController::viewPrintDebug'
entity_print_views.routing.yml in modules/entity_print_views/entity_print_views.routing.yml
modules/entity_print_views/entity_print_views.routing.yml

File

modules/entity_print_views/src/Controller/ViewPrintController.php, line 135

Class

ViewPrintController
Controller class for printing Views.

Namespace

Drupal\entity_print_views\Controller

Code

public function viewPrintDebug($export_type, $view_name, $display_id) {

  /** @var \Drupal\views\Entity\View $view */
  $view = $this->entityTypeManager
    ->getStorage('view')
    ->load($view_name);
  $executable = $view
    ->getExecutable();
  $executable
    ->setDisplay($display_id);
  if ($args = $this->currentRequest->query
    ->get('view_args')) {
    $executable
      ->setArguments($args);
  }
  $use_default_css = $this
    ->config('entity_print.settings')
    ->get('default_css');
  return new Response($this->printBuilder
    ->printHtml($view, $use_default_css, FALSE));
}