- Issue created by @i-grou
- 🇮🇱Israel jsacksick
Ofc, take a look at the order entity type defined by Drupal commerce for example:
$fields['state'] = BaseFieldDefinition::create('state') ->setLabel(t('State')) ->setDescription(t('The order state.')) ->setRequired(TRUE) ->setSetting('max_length', 255) ->setDisplayOptions('view', [ 'label' => 'hidden', 'type' => 'state_transition_form', 'settings' => [ 'require_confirmation' => TRUE, 'use_modal' => TRUE, ], 'weight' => 10, ]) ->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('view', TRUE) ->setSetting('workflow_callback', ['\Drupal\commerce_order\Entity\Order', 'getWorkflowId']);
Automatically closed - issue fixed for 2 weeks with no activity.