public static function PaymentMethodProfileFormatter::isApplicable in Commerce Core 8.2
Returns if the formatter 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 formatter can be used, FALSE otherwise.
Overrides EntityReferenceRevisionsEntityFormatter::isApplicable
File
- modules/
payment/ src/ Plugin/ Field/ FieldFormatter/ PaymentMethodProfileFormatter.php, line 66
Class
- PaymentMethodProfileFormatter
- Plugin implementation of the 'commerce_payment_method_profile' formatter.
Namespace
Drupal\commerce_payment\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition
->getTargetEntityTypeId() === 'commerce_payment_method' && $field_definition
->getName() === 'billing_profile';
}