clean install

This commit is contained in:
matze committed 2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 files changed
+3555714

No files matched your search

@@ -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
@@ -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
@@ -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;
}
}