I can't seem to figure out how to make checkbox field on my entity display as disabled in the admin form area. Looked in Drupal 8s "documentation" but couldn't seem to find anything on it.
I tried variations on the code below but nothing seemed to work. Any help is appreciated. Thank you.
$fields['some_field'] = BaseFieldDefinition::create('boolean') ->setLabel(t('Some Field')) ->setDescription(t('A Field description')) ->setReadOnly(TRUE) ->setRevisionable(FALSE) ->setDefaultValue(FALSE) ->setDisplayOptions('form', [ 'type' => 'boolean_checkbox', 'attributes' => array( 'disabled' => true, ), 'weight' => 0, ]);