How do I create a multi-select checkbox field in a content entity? Trying to figure out how to have 'Desktop', 'Mobile', and 'N/A' as check boxes on a config entity form in drupal 8, where I can select one or more options.
This configuration worked for me:

 $fields['device'] = BaseFieldDefinition::create("list_string")
      -&gt;setSetting('allowed_values', ['desktop'=&gt;'Desktop', 'mobile'=&gt;'Mobile', 'na'=&gt;'N/A'])
      -&gt;setLabel('Device')
      -&gt;setDescription('Select associated devices')
      -&gt;setRequired(TRUE)
      -&gt;setCardinality(-1)
      -&gt;setDisplayOptions('form', array(
        'type' =&gt; 'options_buttons',
        'weight' =&gt; 6
      ))
      -&gt;setDisplayConfigurable('form', TRUE);