You are here

public static function ModerationStateWidget::isApplicable in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/ModerationStateWidget.php \Drupal\workbench_moderation\Plugin\Field\FieldWidget\ModerationStateWidget::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

src/Plugin/Field/FieldWidget/ModerationStateWidget.php, line 247

Class

ModerationStateWidget
Plugin implementation of the 'moderation_state_default' widget.

Namespace

Drupal\workbench_moderation\Plugin\Field\FieldWidget

Code

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