Add a Material asset type.

This commit is contained in:
s33a 2021-07-22 17:44:06 -04:00 committed by Michael Stenta
parent b88877b617
commit 13492129e6
6 changed files with 48 additions and 0 deletions

View File

@ -24,6 +24,7 @@ included with farmOS define the following Asset types:
- Structure
- Sensor
- Water
- Material
- Group*
*Group Assets are unique in that they can "contain" other Assets as "group

View File

@ -29,6 +29,7 @@ function farm_modules() {
'farm_plant' => t('Plant assets'),
'farm_animal' => t('Animal assets'),
'farm_equipment' => t('Equipment assets'),
'farm_material' => t('Material assets'),
'farm_structure' => t('Structure assets'),
'farm_water' => t('Water assets'),
'farm_activity' => t('Activity logs'),

View File

@ -0,0 +1,11 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_material
id: material
label: Material
description: ''
workflow: asset_default
new_revision: true

View File

@ -0,0 +1,11 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_material
id: asset_material
color: yellow
conditions:
asset_type:
- material

View File

@ -0,0 +1,7 @@
name: Material asset
description: Adds a Material asset type.
type: module
package: farmOS Assets
core_version_requirement: ^9
dependencies:
- farm:farm_entity

View File

@ -0,0 +1,17 @@
<?php
namespace Drupal\farm_material\Plugin\Asset\AssetType;
use Drupal\farm_entity\Plugin\Asset\AssetType\FarmAssetType;
/**
* Provides the material asset type.
*
* @AssetType(
* id = "material",
* label = @Translation("Material"),
* )
*/
class Material extends FarmAssetType {
}