mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
23 lines
439 B
PHP
23 lines
439 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* Contains farm_comment_asset.module.
|
||
|
*/
|
||
|
|
||
|
use Drupal\Core\Entity\EntityTypeInterface;
|
||
|
|
||
|
/**
|
||
|
* Implements hook_entity_base_field_info().
|
||
|
*/
|
||
|
function farm_comment_asset_entity_base_field_info(EntityTypeInterface $entity_type) {
|
||
|
$fields = [];
|
||
|
|
||
|
// Add comment base field to assets.
|
||
|
if ($entity_type->id() == 'asset') {
|
||
|
$fields['comment'] = farm_comment_base_field_definition('asset');
|
||
|
}
|
||
|
|
||
|
return $fields;
|
||
|
}
|