GetDKAN/dkan

View on GitHub
modules/metastore/modules/metastore_search/src/Commands/RebuildTrackerCommands.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Drupal\metastore_search\Commands;

use Drush\Commands\DrushCommands;
use Drupal\search_api\Entity\Index;

/**
 * Class DkanSearchCommands.
 *
 * @package Drupal\metastore_search\RebuildTrackerCommands
 */
class RebuildTrackerCommands extends DrushCommands {

  /**
   * Rebuild the search api tracker for the dkan index.
   *
   * @command dkan:metastore-search:rebuild-tracker
   */
  public function rebuildTracker() {
    $index = Index::load('dkan');
    $index->rebuildTracker();
  }

}