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,10 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_quantity_material
id: material
label: Material
description: 'Material quantity type.'
new_revision: true

View File

@@ -0,0 +1,9 @@
name: Material quantity
description: Provides a material quantity type.
type: module
package: farmOS Quantities
core_version_requirement: ^10
dependencies:
- farm:farm_entity
- farm:farm_material_type
- farm:quantity

View File

@@ -0,0 +1,44 @@
<?php
namespace Drupal\farm_quantity_material\Plugin\Quantity\QuantityType;
use Drupal\farm_entity\Plugin\Quantity\QuantityType\FarmQuantityType;
/**
* Provides the material quantity type.
*
* @QuantityType(
* id = "material",
* label = @Translation("Material"),
* )
*/
class Material extends FarmQuantityType {
/**
* {@inheritdoc}
*/
public function buildFieldDefinitions() {
// Inherit default quantity fields.
$fields = parent::buildFieldDefinitions();
// Material type.
$options = [
'type' => 'entity_reference',
'label' => $this->t('Material type'),
'description' => $this->t('What type of materials are being applied?'),
'target_type' => 'taxonomy_term',
'target_bundle' => 'material_type',
'auto_create' => TRUE,
'multiple' => TRUE,
'weight' => [
'form' => -50,
'view' => -50,
],
];
$fields['material_type'] = $this->farmFieldFactory->bundleFieldDefinition($options);
return $fields;
}
}

View File

@@ -0,0 +1,10 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_quantity_standard
id: standard
label: Standard
description: 'Standard quantity type.'
new_revision: true

View File

@@ -0,0 +1,8 @@
name: Standard quantity
description: Provides a standard quantity type.
type: module
package: farmOS Quantities
core_version_requirement: ^10
dependencies:
- farm:farm_entity
- farm:quantity

View File

@@ -0,0 +1,17 @@
<?php
namespace Drupal\farm_quantity_standard\Plugin\Quantity\QuantityType;
use Drupal\farm_entity\Plugin\Quantity\QuantityType\FarmQuantityType;
/**
* Provides the standard quantity type.
*
* @QuantityType(
* id = "standard",
* label = @Translation("Standard"),
* )
*/
class Standard extends FarmQuantityType {
}

View File

@@ -0,0 +1,10 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_quantity_test
id: test
label: Test
description: 'Test measurement quantity type.'
new_revision: true

View File

@@ -0,0 +1,9 @@
name: Test quantity
description: Provides a quantity type for test measurements.
type: module
package: farmOS Quantities
core_version_requirement: ^10
dependencies:
- farm:farm_entity
- farm:farm_test_method
- farm:quantity

View File

@@ -0,0 +1,43 @@
<?php
namespace Drupal\farm_quantity_test\Plugin\Quantity\QuantityType;
use Drupal\farm_entity\Plugin\Quantity\QuantityType\FarmQuantityType;
/**
* Provides the test quantity type.
*
* @QuantityType(
* id = "test",
* label = @Translation("Test measurement"),
* )
*/
class Test extends FarmQuantityType {
/**
* {@inheritdoc}
*/
public function buildFieldDefinitions() {
// Inherit default quantity fields.
$fields = parent::buildFieldDefinitions();
// Test method.
$options = [
'type' => 'entity_reference',
'label' => $this->t('Test method'),
'description' => $this->t('What testing method was used to obtain this measurement?'),
'target_type' => 'taxonomy_term',
'target_bundle' => 'test_method',
'auto_create' => TRUE,
'weight' => [
'form' => 25,
'view' => 25,
],
];
$fields['test_method'] = $this->farmFieldFactory->bundleFieldDefinition($options);
return $fields;
}
}