You are here

class ViewExecutableFactoryWrapper in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Views/ViewExecutableFactoryWrapper.php \Drupal\webprofiler\Views\ViewExecutableFactoryWrapper
  2. 8 webprofiler/src/Views/ViewExecutableFactoryWrapper.php \Drupal\webprofiler\Views\ViewExecutableFactoryWrapper
  3. 8.2 webprofiler/src/Views/ViewExecutableFactoryWrapper.php \Drupal\webprofiler\Views\ViewExecutableFactoryWrapper

Class ViewExecutableFactoryWrapper.

Hierarchy

Expanded class hierarchy of ViewExecutableFactoryWrapper

1 file declares its use of ViewExecutableFactoryWrapper
ViewsDataCollector.php in webprofiler/src/DataCollector/ViewsDataCollector.php

File

webprofiler/src/Views/ViewExecutableFactoryWrapper.php, line 15

Namespace

Drupal\webprofiler\Views
View source
class ViewExecutableFactoryWrapper extends ViewExecutableFactory {

  /**
   * @var \Drupal\views\ViewExecutable*/
  private $views;

  /**
   * {@inheritdoc}
   */
  public function __construct(AccountInterface $user, RequestStack $request_stack, ViewsData $views_data, RouteProviderInterface $route_provider) {
    parent::__construct($user, $request_stack, $views_data, $route_provider);
    $this->views = [];
  }

  /**
   * {@inheritdoc}
   */
  public function get(ViewEntityInterface $view) {
    $view_executable = new TraceableViewExecutable($view, $this->user, $this->viewsData, $this->routeProvider);
    $view_executable
      ->setRequest($this->requestStack
      ->getCurrentRequest());
    $this->views[] = $view_executable;
    return $view_executable;
  }

  /**
   * @return TraceableViewExecutable
   */
  public function getViews() {
    return $this->views;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ViewExecutableFactory::$requestStack protected property The request stack.
ViewExecutableFactory::$routeProvider protected property The route provider.
ViewExecutableFactory::$user protected property Stores the current user.
ViewExecutableFactory::$viewsData protected property The views data.
ViewExecutableFactoryWrapper::$views private property @var \Drupal\views\ViewExecutable
ViewExecutableFactoryWrapper::get public function Instantiates a ViewExecutable class. Overrides ViewExecutableFactory::get
ViewExecutableFactoryWrapper::getViews public function
ViewExecutableFactoryWrapper::__construct public function Constructs a new ViewExecutableFactory. Overrides ViewExecutableFactory::__construct