You are here

public function CliCommandsInterface::delete in Site Alert 8

Deletes site alert(s) with a matching label.

Parameters

string $label: The label to match for deletion.

Return value

int The number of deleted site alerts.

Throws

\InvalidArgumentException Thrown when the label is missing or is not a string.

\Drupal\Core\Entity\EntityStorageException Thrown when an error occurs during the deletion of a site alert.

1 method overrides CliCommandsInterface::delete()
CliCommands::delete in src/CliCommands.php
Deletes site alert(s) with a matching label.

File

src/CliCommandsInterface.php, line 74

Class

CliCommandsInterface
Interface for a service with shared code for CLI tools.

Namespace

Drupal\site_alert

Code

public function delete(string $label) : int;