23 lines
434 B
PHP
23 lines
434 B
PHP
<?php
|
|
|
|
/**
|
|
* @file
|
|
* Contains farm_comment_plan.module.
|
|
*/
|
|
|
|
use Drupal\Core\Entity\EntityTypeInterface;
|
|
|
|
/**
|
|
* Implements hook_entity_base_field_info().
|
|
*/
|
|
function farm_comment_plan_entity_base_field_info(EntityTypeInterface $entity_type) {
|
|
$fields = [];
|
|
|
|
// Add comment base field to plans.
|
|
if ($entity_type->id() == 'plan') {
|
|
$fields['comment'] = farm_comment_base_field_definition('plan');
|
|
}
|
|
|
|
return $fields;
|
|
}
|