You are here

public static function StateTransitionFormFormatter::isApplicable in State Machine 8

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 FormatterBase::isApplicable

File

src/Plugin/Field/FieldFormatter/StateTransitionFormFormatter.php, line 200

Class

StateTransitionFormFormatter
Plugin implementation of the 'state_transition_form' formatter.

Namespace

Drupal\state_machine\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  return $field_definition
    ->getType() == 'state';
}