You are here

class Mp3playerSubscriber in MP3 Player 8

Hierarchy

  • class \Drupal\mp3player\EventSubscriber\Mp3playerSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of Mp3playerSubscriber

1 string reference to 'Mp3playerSubscriber'
mp3player.services.yml in ./mp3player.services.yml
mp3player.services.yml
1 service uses Mp3playerSubscriber
mp3player.event_subscriber in ./mp3player.services.yml
Drupal\mp3player\EventSubscriber\Mp3playerSubscriber

File

src/EventSubscriber/Mp3playerSubscriber.php, line 12

Namespace

Drupal\mp3player\EventSubscriber
View source
class Mp3playerSubscriber implements EventSubscriberInterface {
  protected $started = false;
  public function check_mp3player_files() {
    if (!file_exists(libraries_get_path('audio-player') . '/audio-player.js') || !file_exists(libraries_get_path('audio-player') . '/player.swf')) {
      drupal_set_message(t('%file1 or %file2 were not found in %directory, download the <a href="http://wpaudioplayer.com/download">standalone WordPress Audio Player</a>.', array(
        '%file1' => 'audio-player.js',
        '%file2' => 'player.swf',
        '%directory' => '/' . libraries_get_path('audio-player'),
      )), 'error');
    }
  }

  /**
   * {@inheritdoc}
   */
  static function getSubscribedEvents() {
    $events[KernelEvents::RESPONSE][] = array(
      'check_mp3player_files',
    );
    return $events;
  }
  public function __construct(AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $account_proxy) {
    $this->authenticationProvider = $authentication_provider;
    $this->accountProxy = $account_proxy;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Mp3playerSubscriber::$started protected property
Mp3playerSubscriber::check_mp3player_files public function
Mp3playerSubscriber::getSubscribedEvents static function Returns an array of event names this subscriber wants to listen to.
Mp3playerSubscriber::__construct public function