You are here

public static function FormatterBase::isApplicable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::isApplicable()

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

1 call to FormatterBase::isApplicable()
FileSize::isApplicable in core/modules/file/src/Plugin/Field/FieldFormatter/FileSize.php
Returns if the formatter can be used for the provided field.
9 methods override FormatterBase::isApplicable()
AggregatorTitleFormatter::isApplicable in core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php
Returns if the formatter can be used for the provided field.
AuthorFormatter::isApplicable in core/modules/user/src/Plugin/Field/FieldFormatter/AuthorFormatter.php
Returns if the formatter can be used for the provided field.
AuthorNameFormatter::isApplicable in core/modules/comment/src/Plugin/Field/FieldFormatter/AuthorNameFormatter.php
Returns if the formatter can be used for the provided field.
BaseFieldFileFormatterBase::isApplicable in core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php
Returns if the formatter can be used for the provided field.
EntityReferenceEntityFormatter::isApplicable in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php
Returns if the formatter can be used for the provided field.

... See full list

File

core/lib/Drupal/Core/Field/FormatterBase.php, line 161
Contains \Drupal\Core\Field\FormatterBase.

Class

FormatterBase
Base class for 'Field formatter' plugin implementations.

Namespace

Drupal\Core\Field

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {

  // By default, formatters are available for all fields.
  return TRUE;
}