You are here

public static function ParseNameWidget::isApplicable in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/src/Plugin/Field/FieldWidget/ParseNameWidget.php \Drupal\bibcite_entity\Plugin\Field\FieldWidget\ParseNameWidget::isApplicable()

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/bibcite_entity/src/Plugin/Field/FieldWidget/ParseNameWidget.php, line 114

Class

ParseNameWidget
Plugin implementation of the 'bibcite_parse_name' widget.

Namespace

Drupal\bibcite_entity\Plugin\Field\FieldWidget

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  return parent::isApplicable($field_definition) && $field_definition
    ->getName() === 'name' && $field_definition
    ->getTargetEntityTypeId() === 'bibcite_contributor';
}