function MediaTypeForm::getWorkflowOptions
Same name in other branches
- 8.9.x core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::getWorkflowOptions()
- 10 core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::getWorkflowOptions()
- 11.x core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::getWorkflowOptions()
Prepares workflow options to be used in the 'checkboxes' form element.
Return value
array Array of options ready to be used in #options.
1 call to MediaTypeForm::getWorkflowOptions()
- MediaTypeForm::form in core/
modules/ media/ src/ MediaTypeForm.php - Gets the actual form array to be built.
File
-
core/
modules/ media/ src/ MediaTypeForm.php, line 253
Class
- MediaTypeForm
- Form controller for media type forms.
Namespace
Drupal\mediaCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.