function FileSize::isApplicable

Same name in other branches
  1. 9 core/modules/file/src/Plugin/Field/FieldFormatter/FileSize.php \Drupal\file\Plugin\Field\FieldFormatter\FileSize::isApplicable()

Overrides FormatterBase::isApplicable

File

core/modules/file/src/Plugin/Field/FieldFormatter/FileSize.php, line 25

Class

FileSize
Formatter that shows the file size in a human readable way.

Namespace

Drupal\file\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
    return parent::isApplicable($field_definition) && $field_definition->getName() === 'filesize';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.