public function EntityFormDisplayInterface::getWidget

Returns the Widget plugin for a field.

Parameters

string $field_name: The field name.

Return value

\Drupal\field\Plugin\Type\Widget\WidgetInterface|null A Widget plugin or NULL if the field does not exist.

1 method overrides EntityFormDisplayInterface::getWidget()
EntityFormDisplay::getWidget in drupal/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityFormDisplay.php
Returns the Widget plugin for a field.

File

drupal/core/modules/entity/lib/Drupal/entity/EntityFormDisplayInterface.php, line 26
Contains \Drupal\entity\EntityFormDisplayInterface.

Class

EntityFormDisplayInterface
Provides an interface defining an entity display entity.

Namespace

Drupal\entity

Code

public function getWidget($field_name);