public function AudioFieldPluginBase::renderDefaultPlayer in AudioField 8
Used to render a default player (for fallback).
Parameters
\Drupal\Core\Field\FieldItemListInterface $items: The uploaded item list.
array $settings: An array of additional render settings.
8 calls to AudioFieldPluginBase::renderDefaultPlayer()
- AudioJsAudioPlayer::renderPlayer in src/
Plugin/ AudioPlayer/ AudioJsAudioPlayer.php - Renders the player.
- DefaultMp3Player::renderPlayer in src/
Plugin/ AudioPlayer/ DefaultMp3Player.php - Renders the player.
- JPlayerAudioPlayer::renderPlayer in src/
Plugin/ AudioPlayer/ JPlayerAudioPlayer.php - Renders the player.
- MediaElementAudioPlayer::renderPlayer in src/
Plugin/ AudioPlayer/ MediaElementAudioPlayer.php - Renders the player.
- ProjekktorAudioPlayer::renderPlayer in src/
Plugin/ AudioPlayer/ ProjekktorAudioPlayer.php - Renders the player.
File
- src/
AudioFieldPluginBase.php, line 612
Class
- AudioFieldPluginBase
- Base class for audiofield plugins. Includes global functions.
Namespace
Drupal\audiofieldCode
public function renderDefaultPlayer(FieldItemListInterface $items, array $settings) {
return [
'audioplayer' => [
'#theme' => 'audioplayer',
'#plugin_id' => 'default',
'#settings' => $settings,
'#files' => $this
->getItemRenderList($items),
],
'downloads' => $this
->createDownloadList($items, $settings),
];
}