clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
langcode: en
status: true
dependencies:
module:
- farm_log
enforced:
module:
- farm_harvest
id: harvest
label: Harvest
description: ''
name_pattern: 'Harvest log [log:id]'
workflow: farm_log_workflow
new_revision: true

View File

@@ -0,0 +1,8 @@
name: Harvest log
description: Adds an Harvest log type.
type: module
package: farmOS Logs
core_version_requirement: ^10
dependencies:
- farm:farm_entity
- log:log

View File

@@ -0,0 +1,38 @@
<?php
namespace Drupal\farm_harvest\Plugin\Log\LogType;
use Drupal\farm_entity\Plugin\Log\LogType\FarmLogType;
/**
* Provides the harvest log type.
*
* @LogType(
* id = "harvest",
* label = @Translation("Harvest"),
* )
*/
class Harvest extends FarmLogType {
/**
* {@inheritdoc}
*/
public function buildFieldDefinitions() {
$fields = parent::buildFieldDefinitions();
// Lot number.
$options = [
'type' => 'string',
'label' => $this->t('Lot number'),
'description' => $this->t('If this harvest is part of a batch or lot, enter the lot number here.'),
'weight' => [
'form' => 20,
'view' => 20,
],
];
$fields['lot_number'] = $this->farmFieldFactory->bundleFieldDefinition($options);
return $fields;
}
}