/**
* Prepares workflow options to be used in the 'checkboxes' form element.
*
* @return array
* Array of options ready to be used in #options.
*/
protected function getWorkflowOptions() { $workflow_options =
[ 'status' =>
$this->entity->
getStatus(),
'new_revision' =>
$this->entity->
shouldCreateNewRevision(),
'queue_thumbnail_downloads' =>
$this->entity->
thumbnailDownloadsAreQueued(),
];
// Prepare workflow options to be used for 'checkboxes' form element.
$keys =
array_keys(array_filter($workflow_options));
return array_combine($keys,
$keys);
} /**
* Gets subform state for the media source configuration subform.
*
* @param array $form
* Full form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Parent form state.
*
* @return \Drupal\Core\Form\SubformStateInterface
* Sub-form state for the media source configuration form.
*/