You are here

public function Test::buildFieldDefinitions in farmOS 2.x

Overrides LogTypeBase::buildFieldDefinitions

1 method overrides Test::buildFieldDefinitions()
TestOverride::buildFieldDefinitions in modules/core/entity/tests/modules/farm_entity_test/src/Plugin/Log/LogType/TestOverride.php

File

modules/core/entity/tests/modules/farm_entity_test/src/Plugin/Log/LogType/Test.php, line 20

Class

Test
Provides the test log type.

Namespace

Drupal\farm_entity_test\Plugin\Log\LogType

Code

public function buildFieldDefinitions() {
  $fields = parent::buildFieldDefinitions();

  // Add a test field to all Log bundles.
  $options = [
    'type' => 'string',
    'label' => $this
      ->t('Test default bundle field'),
  ];
  $fields['test_default_bundle_field'] = $this->farmFieldFactory
    ->bundleFieldDefinition($options);
  return $fields;
}