I'm trying to make an entity reference field a multi-select options select but I can't seem to find out how to make that happen. Any help is appreciated. Below is the code I'm using.
$fields['some_field'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Some Field'))
->setDescription(t('This is a field.'))
->setRevisionable(TRUE)
->setSetting('target_type', 'other_entity')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'options_select',
'weight' => 0,
'settings' => [
'options_select' => 'multiple',
'placeholder' => '',
],
])
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE)
->setRequired(FALSE);