You are here

function tca_entity_base_field_info in Token Content Access 8

Same name and namespace in other branches
  1. 2.0.x tca.module \tca_entity_base_field_info()

Implements hook_entity_base_field_info().

File

./tca.module, line 122
Contains tca.module.

Code

function tca_entity_base_field_info(EntityTypeInterface $entity_type) {
  $plugin = \Drupal::service('plugin.manager.tca_plugin')
    ->createInstanceByEntityType($entity_type
    ->id());
  if ($plugin && $plugin
    ->isFieldable()) {
    $fields = _tca_extra_field_definitions();
    return $fields;
  }
}