Added owners field to assets as well as logs
This commit is contained in:
parent
bd6499ecb5
commit
76cce7d908
|
@ -7,3 +7,4 @@ dependencies:
|
|||
- drupal:user
|
||||
- farm:farm_field
|
||||
- log:log
|
||||
- asset:asset
|
||||
|
|
|
@ -13,8 +13,8 @@ use Drupal\Core\Entity\EntityTypeInterface;
|
|||
function farm_owner_entity_base_field_info(EntityTypeInterface $entity_type) {
|
||||
$fields = [];
|
||||
|
||||
// Add owner field to logs.
|
||||
if ($entity_type->id() == 'log') {
|
||||
// Add owner field to logs and assets.
|
||||
if ($entity_type->id() == 'log' || $entity_type->id() == 'asset') {
|
||||
$field_info = [
|
||||
'type' => 'entity_reference',
|
||||
'label' => t('Assigned to'),
|
||||
|
|
Loading…
Reference in New Issue