You are here

public function MediaSitemapBatchController::generate in Media Sitemap 8

Generate.

Return value

string Return Hello string.

1 string reference to 'MediaSitemapBatchController::generate'
media_sitemap.routing.yml in ./media_sitemap.routing.yml
media_sitemap.routing.yml

File

src/Controller/MediaSitemapBatchController.php, line 51
Contains \Drupal\media_sitemap\Controller\MediaSitemapBatchController.

Class

MediaSitemapBatchController
Class MediaSitemapBatchController.

Namespace

Drupal\media_sitemap\Controller

Code

public function generate() {
  $batch = array(
    'title' => t('Processing Media files into media sitemap file'),
    'operations' => array(
      array(
        '\\Drupal\\media_sitemap\\MediaSitemapGenerator::generateSitemap',
        array(),
      ),
    ),
    'finished' => 'MediaSitemapGenerator::sitemapGenerateFinished',
  );
  batch_set($batch);
  return batch_process('admin/config/search/media_sitemap');
}