ViewAjaxController
class ViewAjaxController implements ContainerInjectionInterface (View source)
Defines a controller to load a view via AJAX.
Properties
| protected EntityStorageInterface | $storage | The entity storage for views. |
|
| protected ViewExecutableFactory | $executableFactory | The factory to load a view executable with. |
|
| protected RendererInterface | $renderer | The renderer. |
|
| protected CurrentPathStack | $currentPath | The current path. |
|
| protected RedirectDestinationInterface | $redirectDestination | The redirect destination. |
Methods
Constructs a ViewAjaxController object.
Instantiates a new instance of this class.
Loads and renders a view via AJAX.
Details
__construct(EntityStorageInterface $storage, ViewExecutableFactory $executable_factory, RendererInterface $renderer, CurrentPathStack $current_path, RedirectDestinationInterface $redirect_destination)
Constructs a ViewAjaxController object.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
ViewAjaxResponse
ajaxView(Request $request)
Loads and renders a view via AJAX.