You are here

trait IsApplicable in Client-side Hierarchical Select 8

Same name and namespace in other branches
  1. 8.3 src/IsApplicable.php \Drupal\cshs\IsApplicable
  2. 8.2 src/IsApplicable.php \Drupal\cshs\IsApplicable

Class IsApplicable.

Hierarchy

2 files declare their use of IsApplicable
CshsFormatterBase.php in src/Plugin/Field/FieldFormatter/CshsFormatterBase.php
CshsWidget.php in src/Plugin/Field/FieldWidget/CshsWidget.php

File

src/IsApplicable.php, line 10

Namespace

Drupal\cshs
View source
trait IsApplicable {

  /**
   * {@inheritdoc}
   */
  public static function isApplicable(FieldDefinitionInterface $field_definition) : bool {
    return 'taxonomy_term' === $field_definition
      ->getFieldStorageDefinition()
      ->getSetting('target_type');
  }

}

Members