public function Second::buildFieldDefinitions in farmOS 2.x
Overrides FarmPlanType::buildFieldDefinitions
File
- modules/
core/ entity/ tests/ modules/ farm_entity_bundle_fields_test/ src/ Plugin/ Plan/ PlanType/ Second.php, line 21
Class
- Second
- Provides the second test plan type.
Namespace
Drupal\farm_entity_bundle_fields_test\Plugin\Plan\PlanTypeCode
public function buildFieldDefinitions() {
// Inherit all plan fields.
$fields = parent::buildFieldDefinitions();
// Create a field for just this bundle.
$fields['second_plan_field'] = BundleFieldDefinition::create('boolean')
->setLabel($this
->t('Test field for second plan type'));
return $fields;
}