class MediaExpireCommands in Media Expire 8.2
Defines Drush commands for the media_expire module.
Hierarchy
- class \Drupal\media_expire\Commands\MediaExpireCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of MediaExpireCommands
1 string reference to 'MediaExpireCommands'
1 service uses MediaExpireCommands
File
- src/
Commands/ MediaExpireCommands.php, line 11
Namespace
Drupal\media_expire\CommandsView source
class MediaExpireCommands extends DrushCommands {
/**
* The media expire service.
*
* @var \Drupal\media_expire\MediaExpireService
*/
protected $mediaExpireService;
/**
* MediaExpireCommands constructor.
*
* @param \Drupal\media_expire\MediaExpireService $media_expire_service
* The media expire service.
*/
public function __construct(MediaExpireService $media_expire_service) {
parent::__construct();
$this->mediaExpireService = $media_expire_service;
}
/**
* Checks for expired media.
*
* @command media:expire-check
* @aliases mec,media-expire-check
*/
public function expireCheck() {
$this->mediaExpireService
->unpublishExpiredMedia();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaExpireCommands:: |
protected | property | The media expire service. | |
MediaExpireCommands:: |
public | function | Checks for expired media. | |
MediaExpireCommands:: |
public | function | MediaExpireCommands constructor. |