Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: System activities > Description of the PHP API for system activities > API methods > Work with subtables

clearSubtable(string $subtable, bool $deleteAttachedFiles): void

Scroll Prev Top Next More

Deletes all entries of a subtable.

Parameter

Type

Description

$subtable

string

Name of the subtable

$deleteAttachedFiles

bool

Flag that determines whether all attached files in the subtable should also be physically deleted (optional); default value is false;

If an error occurs, the function throws a JobRouterException.

Example:

try {

    $this->clearSubtable("mySubtableName");

} catch (JobRouterException $e) {

    $this->error($e->getMessage());

    throw new JobRouterException('An error has occurred. For further details, please refer to the log file.');

}