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,25 @@
langcode: en
status: true
dependencies:
config:
- field.storage.taxonomy_term.transplant_days
- taxonomy.vocabulary.plant_type
enforced:
module:
- farm_transplanting
id: taxonomy_term.plant_type.transplant_days
field_name: transplant_days
entity_type: taxonomy_term
bundle: plant_type
label: 'Days to transplant'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: 1
max: null
prefix: ''
suffix: ' day| days'
field_type: integer

View File

@@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_transplanting
module:
- taxonomy
id: taxonomy_term.transplant_days
field_name: transplant_days
entity_type: taxonomy_term
type: integer
settings:
unsigned: true
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
module:
- farm_location
- farm_log
enforced:
module:
- farm_transplanting
third_party_settings:
farm_location:
is_movement: true
id: transplanting
label: Transplanting
description: ''
name_pattern: 'Transplanting log [log:id]'
workflow: farm_log_workflow
new_revision: true

View File

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

View File

@@ -0,0 +1,43 @@
<?php
/**
* @file
* Contains farm_transplanting.module.
*/
use Drupal\Core\Entity\Display\EntityFormDisplayInterface;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
/**
* Implements hook_entity_form_display_alter().
*/
function farm_transplanting_entity_form_display_alter(EntityFormDisplayInterface $form_display, array $context) {
if ($context['entity_type'] == 'taxonomy_term' && $context['bundle'] == 'plant_type' && $form_display->getMode() == 'default' && $form_display->isNew()) {
$form_display->setComponent('transplant_days', [
'type' => 'number',
'settings' => [
'placeholder' => '',
],
'region' => 'content',
'weight' => 15,
]);
}
}
/**
* Implements hook_entity_view_display_alter().
*/
function farm_transplanting_entity_view_display_alter(EntityViewDisplayInterface $display, array $context) {
if ($context['entity_type'] == 'taxonomy_term' && $context['bundle'] == 'plant_type' && $display->getMode() == 'full' && $display->isNew()) {
$display->setComponent('transplant_days', [
'type' => 'number_integer',
'label' => 'inline',
'settings' => [
'thousand_separator' => '',
'prefix_suffix' => TRUE,
],
'region' => 'content',
'weight' => 15,
]);
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace Drupal\farm_transplanting\Plugin\Log\LogType;
use Drupal\farm_entity\Plugin\Log\LogType\FarmLogType;
/**
* Provides the transplanting log type.
*
* @LogType(
* id = "transplanting",
* label = @Translation("Transplanting"),
* )
*/
class Transplanting extends FarmLogType {
}