media_expire.drush.inc in Media Expire 8.2
Same filename and directory in other branches
Drush integration for the media_expire module.
File
drush/media_expire.drush.incView source
<?php
/**
* @file
* Drush integration for the media_expire module.
*/
/**
* Implements hook_drush_command().
*/
function media_expire_drush_command() {
$items['media-expire-check'] = [
'description' => dt('Checks for expired media.'),
'aliases' => [
'mec',
],
];
return $items;
}
/**
* Checks for expired media.
*/
function drush_media_expire_check() {
/** @var \Drupal\media_expire\MediaExpireService $service */
$service = \Drupal::service('media_expire.service');
$service
->unpublishExpiredMedia();
}
Functions
Name | Description |
---|---|
drush_media_expire_check | Checks for expired media. |
media_expire_drush_command | Implements hook_drush_command(). |