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,18 @@
langcode: en
status: true
dependencies:
module:
- farm_location
- farm_log
enforced:
module:
- farm_seeding
third_party_settings:
farm_location:
is_movement: true
id: seeding
label: Seeding
description: ''
name_pattern: 'Seeding log [log:id]'
workflow: farm_log_workflow
new_revision: true

View File

@@ -0,0 +1,9 @@
name: Seeding log
description: Adds a Seeding log type for Plant assets.
type: module
package: farmOS Logs
core_version_requirement: ^10
dependencies:
- farm:farm_entity
- farm:farm_plant
- log:log

View File

@@ -0,0 +1,62 @@
<?php
namespace Drupal\farm_seeding\Plugin\Log\LogType;
use Drupal\farm_entity\Plugin\Log\LogType\FarmLogType;
/**
* Provides the seeding log type.
*
* @LogType(
* id = "seeding",
* label = @Translation("Seeding"),
* )
*/
class Seeding extends FarmLogType {
/**
* {@inheritdoc}
*/
public function buildFieldDefinitions() {
$fields = parent::buildFieldDefinitions();
// Lot number.
$options = [
'type' => 'string',
'label' => $this->t('Lot number'),
'description' => $this->t('If the seed is part of a batch or lot, enter the lot number here.'),
'weight' => [
'form' => 20,
'view' => 20,
],
];
$fields['lot_number'] = $this->farmFieldFactory->bundleFieldDefinition($options);
// Purchase date.
$options = [
'type' => 'timestamp',
'label' => $this->t('Purchase date'),
'description' => $this->t('When was the seed purchased (if applicable)?'),
'weight' => [
'form' => -35,
'view' => -35,
],
];
$fields['purchase_date'] = $this->farmFieldFactory->bundleFieldDefinition($options);
// Source.
$options = [
'type' => 'string',
'label' => $this->t('Source'),
'description' => $this->t('Where was the seed obtained? Who supplied it?'),
'weight' => [
'form' => -40,
'view' => -40,
],
];
$fields['source'] = $this->farmFieldFactory->bundleFieldDefinition($options);
return $fields;
}
}