You are here

IsApplicable.php in Client-side Hierarchical Select 8

Same filename and directory in other branches
  1. 8.3 src/IsApplicable.php
  2. 8.2 src/IsApplicable.php

Namespace

Drupal\cshs

File

src/IsApplicable.php
View source
<?php

namespace Drupal\cshs;

use Drupal\Core\Field\FieldDefinitionInterface;

/**
 * Class IsApplicable.
 */
trait IsApplicable {

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

}

Traits

Namesort descending Description
IsApplicable Class IsApplicable.