You are here

public function EntityBrowser::getWidget in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Entity/EntityBrowser.php \Drupal\entity_browser\Entity\EntityBrowser::getWidget()

Returns a specific widget.

Parameters

string $widget: The widget ID.

Return value

\Drupal\entity_browser\WidgetInterface The widget object.

Overrides EntityBrowserInterface::getWidget

File

src/Entity/EntityBrowser.php, line 268

Class

EntityBrowser
Defines an entity browser configuration entity.

Namespace

Drupal\entity_browser\Entity

Code

public function getWidget($widget) {
  return $this
    ->getWidgets()
    ->get($widget);
}