You are here

public static function ListPriceWidget::isApplicable in Commerce Core 8.2

Returns if the widget can be used for the provided field.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked.

Return value

bool TRUE if the widget can be used, FALSE otherwise.

Overrides WidgetBase::isApplicable

File

modules/price/src/Plugin/Field/FieldWidget/ListPriceWidget.php, line 72

Class

ListPriceWidget
Plugin implementation of the 'commerce_list_price' widget.

Namespace

Drupal\commerce_price\Plugin\Field\FieldWidget

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  return $field_definition
    ->getName() == 'list_price';
}