You are here

protected function EntityBrowserFormController::loadBrowser in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Controllers/EntityBrowserFormController.php \Drupal\entity_browser\Controllers\EntityBrowserFormController::loadBrowser()

Loads entity browser object for this page.

Return value

\Drupal\entity_browser\EntityBrowserInterface Loads the entity browser object

2 calls to EntityBrowserFormController::loadBrowser()
EntityBrowserFormController::getFormObject in src/Controllers/EntityBrowserFormController.php
Returns the object used to build the form.
EntityBrowserFormController::title in src/Controllers/EntityBrowserFormController.php
Standalone entity browser title callback.

File

src/Controllers/EntityBrowserFormController.php, line 106

Class

EntityBrowserFormController
Standalone entity browser page.

Namespace

Drupal\entity_browser\Controllers

Code

protected function loadBrowser() {

  /* @var $route \Symfony\Component\Routing\Route */
  $route = $this->currentRouteMatch
    ->getRouteObject();

  /* @var $browser \Drupal\entity_browser\EntityBrowserInterface */
  return $this->browserStorage
    ->load($route
    ->getDefault('entity_browser_id'));
}