Add a Material asset type.
This commit is contained in:
parent
b88877b617
commit
13492129e6
|
@ -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
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_material
|
||||
id: material
|
||||
label: Material
|
||||
description: ''
|
||||
workflow: asset_default
|
||||
new_revision: true
|
|
@ -0,0 +1,11 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_material
|
||||
id: asset_material
|
||||
color: yellow
|
||||
conditions:
|
||||
asset_type:
|
||||
- material
|
|
@ -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
|
|
@ -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 {
|
||||
|
||||
}
|
Loading…
Reference in New Issue