public function Medical::buildFieldDefinitions in farmOS 2.x
Overrides LogTypeBase::buildFieldDefinitions
File
- modules/
log/ medical/ src/ Plugin/ Log/ LogType/ Medical.php, line 20
Class
- Medical
- Provides the medical log type.
Namespace
Drupal\farm_medical\Plugin\Log\LogTypeCode
public function buildFieldDefinitions() {
$fields = parent::buildFieldDefinitions();
// Veterinarian.
$options = [
'type' => 'string',
'label' => $this
->t('Veterinarian'),
'description' => $this
->t('If a veterinarian was involved, enter their name here.'),
'weight' => [
'form' => -40,
'view' => -40,
],
];
$fields['vet'] = $this->farmFieldFactory
->bundleFieldDefinition($options);
return $fields;
}