Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BatchBuilder.php

function BatchBuilder::addOperation

Adds a batch operation.

Parameters

callable $callback: The name of the callback function.

array $arguments: An array of arguments to pass to the callback function.

Return value

$this

File

core/lib/Drupal/Core/Batch/BatchBuilder.php, line 315

Class

BatchBuilder
Builds an array for a batch process.

Namespace

Drupal\Core\Batch

Code

public function addOperation(callable $callback, array $arguments = []) {
    $this->operations[] = [
        $callback,
        $arguments,
    ];
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal