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,11 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_plant
id: plant
label: Plant
description: ''
workflow: asset_default
new_revision: true

View File

@@ -0,0 +1,57 @@
langcode: en
status: true
dependencies:
config:
- asset.type.plant
- core.entity_view_mode.asset.map_popup
module:
- options
- text
id: asset.plant.map_popup
targetEntityType: asset
bundle: plant
mode: map_popup
content:
flag:
label: inline
type: list_default
weight: 0
region: content
settings: { }
third_party_settings: { }
location:
type: entity_reference_label
weight: 3
region: content
label: inline
settings:
link: true
third_party_settings: { }
notes:
label: inline
type: text_default
weight: 2
region: content
settings: { }
third_party_settings: { }
plant_type:
label: inline
type: entity_reference_label
weight: 1
settings:
link: false
region: content
third_party_settings: { }
hidden:
data: true
file: true
geometry: true
id_tag: true
image: true
intrinsic_geometry: true
is_fixed: true
is_location: true
parent: true
season: true
status: true
uid: true

View File

@@ -0,0 +1,11 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_plant
id: asset_plant
color: green
conditions:
asset_type:
- plant

View File

@@ -0,0 +1,10 @@
name: Plant asset
description: Adds a Plant asset type.
type: module
package: farmOS Assets
core_version_requirement: ^10
dependencies:
- farm:asset
- farm:farm_entity
- farm:farm_plant_type
- farm:farm_season

View File

@@ -0,0 +1,57 @@
<?php
namespace Drupal\farm_plant\Plugin\Asset\AssetType;
use Drupal\farm_entity\Plugin\Asset\AssetType\FarmAssetType;
/**
* Provides the plant asset type.
*
* @AssetType(
* id = "plant",
* label = @Translation("Plant"),
* )
*/
class Plant extends FarmAssetType {
/**
* {@inheritdoc}
*/
public function buildFieldDefinitions() {
$fields = parent::buildFieldDefinitions();
$field_info = [
'plant_type' => [
'type' => 'entity_reference',
'label' => $this->t('Crop/variety'),
'description' => $this->t("Enter this plant asset's crop/variety."),
'target_type' => 'taxonomy_term',
'target_bundle' => 'plant_type',
'auto_create' => TRUE,
'required' => TRUE,
'multiple' => TRUE,
'weight' => [
'form' => -90,
'view' => -50,
],
],
'season' => [
'type' => 'entity_reference',
'label' => $this->t('Season'),
'description' => $this->t('Assign this to a season for easier searching later.'),
'target_type' => 'taxonomy_term',
'target_bundle' => 'season',
'auto_create' => TRUE,
'multiple' => TRUE,
'weight' => [
'form' => -50,
'view' => -50,
],
],
];
foreach ($field_info as $name => $info) {
$fields[$name] = $this->farmFieldFactory->bundleFieldDefinition($info);
}
return $fields;
}
}