You are here

public static function SchedulerModerationWidget::isApplicable in Scheduler content moderation integration 8

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/SchedulerModerationWidget.php, line 108

Class

SchedulerModerationWidget
Plugin implementation of the 'scheduler moderation' widget.

Namespace

Drupal\scheduler_content_moderation_integration\Plugin\Field\FieldWidget

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  if ($field_definition instanceof BaseFieldDefinition && $field_definition
    ->getProvider() === 'scheduler_content_moderation_integration') {
    return TRUE;
  }
}