public static function DownloadLimitWidget::isApplicable in Commerce File 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
- src/
Plugin/ Field/ FieldWidget/ DownloadLimitWidget.php, line 72
Class
- DownloadLimitWidget
- Plugin implementation of 'commerce_file_download_limit'.
Namespace
Drupal\commerce_file\Plugin\Field\FieldWidgetCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition
->getTargetEntityTypeId() === 'commerce_license' && $field_definition
->getName() === 'file_download_limit';
}