function TestFieldWidgetMultiple::isApplicable

Used in \Drupal\field\Tests\EntityReference\EntityReferenceAdminTest::testAvailableFormatters().

Overrides WidgetBase::isApplicable

File

core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldWidget/TestFieldWidgetMultiple.php, line 99

Class

TestFieldWidgetMultiple
Plugin implementation of the 'test_field_widget_multiple' widget.

Namespace

Drupal\field_test\Plugin\Field\FieldWidget

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  // Returns FALSE if machine name of the field equals field_onewidgetfield.
  return $field_definition->getName() != "field_onewidgetfield";
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.