entity_usage-8.x-2.x-dev/entity_usage.drush.inc

entity_usage.drush.inc
<?php

/**
 * @file
 * Defines drush commands for the Entity Usage module.
 */

/**
 * Implements hook_drush_command().
 */
function entity_usage_drush_command() {
  $items = [];

  $items['entity-usage-recreate'] = [
    'description' => 'Recreate all entity usage statistics.',
    'aliases' => ['eu-r'],
  ];

  return $items;
}

/**
 * Command callback for 'entity-usage-recreate'.
 */
function drush_entity_usage_recreate() {
  \Drupal::service('entity_usage.batch_manager')->recreate();
  drush_backend_batch_process();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc