You are here

public function EntityBrowser::deleteWidget in Entity Browser 8

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

Deletes a widget from this entity browser.

Parameters

\Drupal\entity_browser\WidgetInterface $widget: The widget object.

Return value

$this

Overrides EntityBrowserInterface::deleteWidget

File

src/Entity/EntityBrowser.php, line 298

Class

EntityBrowser
Defines an entity browser configuration entity.

Namespace

Drupal\entity_browser\Entity

Code

public function deleteWidget(WidgetInterface $widget) {
  $this
    ->getWidgets()
    ->removeInstanceId($widget
    ->uuid());
  return $this;
}