You are here

function termcase_batch_update in Termcase 8

Function to define batch process.

Parameters

array $terms: List of terms.

string $case: Case of the vocabulary, the term belongs to.

1 call to termcase_batch_update()
termcase_custom_form_submit in ./termcase.module
Submit callback to save Termcase settings with the Vocabulary.

File

./termcase.module, line 123
The Termcase module gives you the option to specify specific case-formatting on terms.

Code

function termcase_batch_update($terms, $case) {
  $batch = [
    'title' => t('Updating terms...'),
    'operations' => [
      [
        '\\Drupal\\termcase\\UpdateTerms::updateAllTerms',
        [
          $terms,
          $case,
        ],
      ],
    ],
    'finished' => '\\Drupal\\termcase\\UpdateTerms::updateAllTermsFinishedCallback',
  ];
  batch_set($batch);
}