You are here

media_expire.drush.inc in Media Expire 8.2

Same filename and directory in other branches
  1. 8 drush/media_expire.drush.inc

Drush integration for the media_expire module.

File

drush/media_expire.drush.inc
View 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

Namesort descending Description
drush_media_expire_check Checks for expired media.
media_expire_drush_command Implements hook_drush_command().