You are here

public static function Mp3playerController::mp3player_players in MP3 Player 8

Return list of all available players along with settings.

3 calls to Mp3playerController::mp3player_players()
Mp3playerAddForm::buildForm in src/Form/Mp3playerAddForm.php
Form constructor.
Mp3playerController::mp3player_player_list in src/Controller/Mp3playerController.php
Mp3playerDeleteForm::buildForm in src/Form/Mp3playerDeleteForm.php
Form constructor.

File

src/Controller/Mp3playerController.php, line 34

Class

Mp3playerController

Namespace

Drupal\mp3player\Controller

Code

public static function mp3player_players($pid = NULL) {
  $players = array();
  $result = db_select('mp3player_players', 'm')
    ->fields('m')
    ->execute();
  while ($player = $result
    ->fetchAssoc()) {
    $players[$player['pid']] = $player;
  }
  return $players;
}