Skip to content

Commit 7f7a592

Browse files
niko-mglaman
authored andcommitted
Issue #2855118 by mglaman, niko-: Coupon status should be exposed in UI
1 parent a5ee963 commit 7f7a592

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

modules/promotion/src/Entity/Coupon.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
9191
$fields['status'] = BaseFieldDefinition::create('boolean')
9292
->setLabel(t('Active status'))
9393
->setDescription(t('A boolean indicating whether the Coupon is active.'))
94-
->setDefaultValue(TRUE);
94+
->setDefaultValue(TRUE)
95+
->setDisplayOptions('form', [
96+
'type' => 'boolean_checkbox',
97+
'weight' => 99,
98+
])
99+
->setDisplayConfigurable('form', TRUE);
95100

96101
return $fields;
97102
}

0 commit comments

Comments
 (0)