Drupal 8  8.0.2
BatchStorage Class Reference
Inheritance diagram for BatchStorage:

Public Member Functions

 __construct (Connection $connection, SessionInterface $session, CsrfTokenGenerator $csrf_token)
 
 load ($id)
 
 delete ($id)
 
 update (array $batch)
 
 cleanup ()
 
 create (array $batch)
 

Protected Attributes

 $connection
 
 $session
 
 $csrfToken
 

Constructor & Destructor Documentation

__construct ( Connection  $connection,
SessionInterface  $session,
CsrfTokenGenerator  $csrf_token 
)

Constructs the database batch storage service.

Parameters
\Drupal\Core\Database\Connection$connectionThe database connection.
\Symfony\Component\HttpFoundation\Session\SessionInterface$sessionThe session.
\Drupal\Core\Access\CsrfTokenGenerator$csrf_tokenThe CSRF token generator.

References Drupal\csrfToken().

Here is the call graph for this function:

Member Function Documentation

cleanup ( )

{Cleans up failed or old batches.}

Implements BatchStorageInterface.

create ( array  $batch)

{Creates and saves a batch.

Parameters
array$batchThe array representing the batch to create.
}

Implements BatchStorageInterface.

References Drupal\csrfToken().

Here is the call graph for this function:

delete (   $id)

{Deletes a batch.

Parameters
int$idThe ID of the batch to delete.
}

Implements BatchStorageInterface.

load (   $id)

{Loads a batch.

Parameters
int$idThe ID of the batch to load.
Returns
array An array representing the batch, or FALSE if no batch was found.
}

Implements BatchStorageInterface.

References Drupal\csrfToken().

Here is the call graph for this function:

update ( array  $batch)

{Updates a batch.

Parameters
array$batchThe array representing the batch to update.
}

Implements BatchStorageInterface.


The documentation for this class was generated from the following file: