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'
1 service uses Mp3playerSubscriber
File
- src/
EventSubscriber/ Mp3playerSubscriber.php, line 12
Namespace
Drupal\mp3player\EventSubscriberView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Mp3playerSubscriber:: |
protected | property | ||
Mp3playerSubscriber:: |
public | function | ||
Mp3playerSubscriber:: |
static | function | Returns an array of event names this subscriber wants to listen to. | |
Mp3playerSubscriber:: |
public | function |